Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ram_arch.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Gautier Hattenberger and Alexandre Bustico
3
*
4
* This file is part of paparazzi.
5
*
6
* paparazzi is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2, or (at your option)
9
* any later version.
10
*
11
* paparazzi is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with paparazzi; see the file COPYING. If not, see
18
* <http://www.gnu.org/licenses/>.
19
*/
20
43
#ifndef RAM_ARCH_H
44
#define RAM_ARCH_H
45
46
#if defined(STM32F1XX)
47
#define STD_SECTION ".ram0"
48
#define FAST_SECTION ".ram0"
49
#define DMA_SECTION ".ram0"
50
#define DMA_ALIGN 8
51
#elif defined(STM32F3XX)
52
#define STD_SECTION ".ram0"
53
#define FAST_SECTION ".ram4"
54
#define DMA_SECTION ".ram0"
55
#define DMA_ALIGN 8
56
#elif defined(STM32F4XX)
57
#define STD_SECTION ".ram0"
58
#define FAST_SECTION ".ram4"
59
#define DMA_SECTION ".ram0"
60
#define DMA_ALIGN 8
61
#elif defined(STM32F7XX)
62
#define STD_SECTION ".ram0"
63
#define FAST_SECTION ".ram0"
64
#define DMA_SECTION ".ram3"
65
#define DMA_ALIGN 8
66
#elif defined(STM32H7XX)
67
#define STD_SECTION ".ram1"
68
#define FAST_SECTION ".ram5"
69
#define DMA_SECTION ".ram0nc"
70
#define BDMA_SECTION ".ram4"
71
#define SDMMC_SECTION DMA_SECTION
72
#define DMA_ALIGN 32
73
#else
74
#error "section defined only for STM32F1, STM32F3, STM32F4, STM32F7 and STM32H7"
75
#endif
76
77
#define IN_STD_SECTION_NOINIT(var) var __attribute__ ((section(STD_SECTION), aligned(8)))
78
#define IN_STD_SECTION_CLEAR(var) var __attribute__ ((section(STD_SECTION "_clear"
), aligned(8)))
79
#define IN_STD_SECTION(var) var __attribute__ ((section(STD_SECTION "_init"
), aligned(8)))
80
81
#define IN_FAST_SECTION_NOINIT(var) var __attribute__ ((section(FAST_SECTION), aligned(8)))
82
#define IN_FAST_SECTION_CLEAR(var) var __attribute__ ((section(FAST_SECTION "_clear"
), aligned(8)))
83
#define IN_FAST_SECTION(var) var __attribute__ ((section(FAST_SECTION "_init"
), aligned(8)))
84
85
#define IN_DMA_SECTION_NOINIT(var) var __attribute__ ((section(DMA_SECTION), aligned(DMA_ALIGN)))
86
#define IN_DMA_SECTION_CLEAR(var) var __attribute__ ((section(DMA_SECTION "_clear"
), aligned(DMA_ALIGN)))
87
#define IN_DMA_SECTION(var) var __attribute__ ((section(DMA_SECTION "_init"
), aligned(DMA_ALIGN)))
88
89
#define IN_BDMA_SECTION_NOINIT(var) var __attribute__ ((section(BDMA_SECTION), aligned(DMA_ALIGN)))
90
#define IN_BDMA_SECTION_CLEAR(var) var __attribute__ ((section(BDMA_SECTION "_clear"
), aligned(DMA_ALIGN)))
91
#define IN_BDMA_SECTION(var) var __attribute__ ((section(BDMA_SECTION "_init"
), aligned(DMA_ALIGN)))
92
93
#define IN_SDMMC_SECTION_NOINIT(var) var __attribute__ ((section(SDMMC_SECTION), aligned(DMA_ALIGN)))
94
#define IN_SDMMC_SECTION_CLEAR(var) var __attribute__ ((section(SDMMC_SECTION "_clear"
), aligned(DMA_ALIGN)))
95
#define IN_SDMMC_SECTION(var) var __attribute__ ((section(SDMMC_SECTION "_init"
), aligned(DMA_ALIGN)))
96
97
#endif
98
sw
airborne
arch
chibios
mcu_periph
ram_arch.h
Generated on Fri Nov 8 2024 14:10:44 for Paparazzi UAS by
1.9.1