Hallo,
ich möchte
1 | #define MAXDATENSPIEGEL (1024)
|
2 | static __attribute__((section ("Datenspiegel"))) volatile uint8_t Datenspiegel[MAXDATENSPIEGEL];
|
an einen festen bereich im internen SRAM legen.
Hierfür habe ich das Scatter File umgeschrieben
1 | LR_IROM1 0x08000000 0x00200000 { ; load region size_region
|
2 | ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
|
3 | *.o (RESET, +First)
|
4 | *(InRoot$$Sections)
|
5 | .ANY (+RO)
|
6 | }
|
7 |
|
8 | RW_IRAM1 0x20000000 0x0002FC00{
|
9 |
|
10 | .ANY (+RW +ZI)
|
11 |
|
12 | }
|
13 |
|
14 | RW_IRAM_PROT 0x2002FC00 0x400
|
15 | {
|
16 | *(Datenspiegel)
|
17 | }
|
18 | }
|
Das 1024 Byte große Array sollte eigentlich genau reinpassen.
Hex 400 sind 1024 Byte.
Allerdings bekomme ich eine folgende Fehlermeldung:
Error: L6220E: Execution region RW_IRAM_PROT size (2048 bytes) exceeds
limit (1024 bytes). Region contains 0 bytes of padding and 0 bytes of
veneers (total 0 bytes of linker generated content).
Warum muss mein Speicherbereich 2048 Byte groß sein, wenn ich doch nur
1024 Byte speichern möchte bzw. wenn mein Array nur 1024 Byte groß ist ?
Ist ja als uint8_t angegeben.