Skip to content

Commit

Permalink
Update section names for non-initialized variables for AC6 (#105)
Browse files Browse the repository at this point in the history
Update section names for non-initialized variables for AC6
- synchronize with latest CMSIS core
  • Loading branch information
MiloradCvjetkovic authored Nov 30, 2023
1 parent 3ca717a commit 6236f12
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Documentation/Doxygen/src/event_recorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ For the **Arm Compiler** toolchain add the following code snippet to the linker
```
RW_NOINIT <start_address> UNINIT 0x800 {
*(.noinit)
*(.noinit.*)
*(.bss.noinit)
*(.bss.noinit.*)
}
```
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Doxygen/src/fault.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ For the Arm Compiler toolchain add the following code snippet to the linker scri
```
RW_NOINIT <start_address> UNINIT 0x800 {
*(.noinit)
*(.noinit.*)
*(.bss.noinit)
*(.bss.noinit.*)
}
```
Expand Down
8 changes: 6 additions & 2 deletions EventRecorder/Source/EventRecorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
#endif

#if !defined(__NO_INIT)
//lint -esym(9071, __NO_INIT) "defined macro is reserved to the compiler"
#define __NO_INIT __attribute__ ((section (".noinit")))
//lint -esym(9071, __NO_INIT) "Suppress: defined macro is reserved to the compiler"
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler 6 */
#define __NO_INIT __attribute__ ((section (".bss.noinit")))
#else /* all other compilers */
#define __NO_INIT __attribute__ ((section (".noinit")))
#endif
#endif

//lint -e(9026) "Function-like macro"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ LR_CODE S_CODE_START {
}

ER_DATA_NOINIT +0 ALIGN 64 UNINIT 0x00002000 {
*(.noinit)
*(.noinit.*)
*(.bss.noinit)
*(.bss.noinit.*)
}

#if HEAP_SIZE > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ LR_APP __LR_BASE __LR_SIZE { /* load reg
}

RW_NOINIT_FAULT 0x200B0000 UNINIT 0x100 { /* Uninitialized memory for Fault information (ARM_FaultInfo) */
*(.noinit.fault)
*(.bss.noinit.fault)
}

#if __NOINIT_SIZE > 0
RW_NOINIT __RW_NOINIT_BASE UNINIT __NOINIT_SIZE { /* no init data */
*(.noinit)
*(.bss.noinit)
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ LR_APP __LR_BASE __LR_SIZE { /* load reg

#if __NOINIT_SIZE > 0
RW_NOINIT __RW_NOINIT_BASE UNINIT __NOINIT_SIZE { /* no init data */
*(.noinit)
*(.bss.noinit)
}
#endif

Expand All @@ -125,7 +125,7 @@ LR_APP __LR_BASE __LR_SIZE { /* load reg
}

RW_NS_NOINIT_FAULT 0x200B0000 UNINIT 0x100 { /* Uninitialized memory for Fault information (ARM_FaultInfo) */
*(.noinit.fault)
*(.bss.noinit.fault)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ LR_ROM __RO_BASE __RO_SIZE { ; load region size_region

#if __NOINIT_SIZE > 0
RW_NOINIT __RW_NOINIT_BASE UNINIT __NOINIT_SIZE { ; no init data
*(.noinit)
*(.noinit.*)
*(.bss.noinit)
*(.bss.noinit.*)
}
#endif

Expand Down
12 changes: 8 additions & 4 deletions Fault/Source/ARM_FaultStorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@

// Compiler-specific defines
#if !defined(__NAKED)
//lint -esym(9071, __NAKED) "Suppress: defined macro is reserved to the compiler"
#define __NAKED __attribute__((naked))
//lint -esym(9071, __NAKED) "Suppress: defined macro is reserved to the compiler"
#define __NAKED __attribute__((naked))
#endif
#if !defined(__NO_INIT_FAULT)
//lint -esym(9071, __NO_INIT_FAULT) "Suppress: defined macro is reserved to the compiler"
#define __NO_INIT_FAULT __attribute__ ((section (".noinit.fault")))
//lint -esym(9071, __NO_INIT_FAULT) "Suppress: defined macro is reserved to the compiler"
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler 6 */
#define __NO_INIT_FAULT __attribute__ ((section (".bss.noinit.fault")))
#else /* all other compilers */
#define __NO_INIT_FAULT __attribute__ ((section (".noinit.fault")))
#endif
#endif

#if (ARM_FAULT_FAULT_REGS_EXIST != 0)
Expand Down

0 comments on commit 6236f12

Please sign in to comment.