Skip to content

Commit

Permalink
Update section names for non-initialized variables for AC6
Browse files Browse the repository at this point in the history
- synchronize with latest CMSIS core
- in example for B-U585I-IOT02A board BSP pack set to latest since VIO using new API from CMSIS-6 is incompatible with implementation in BSP v1.0.0
  • Loading branch information
MiloradCvjetkovic committed Nov 29, 2023
1 parent 3ca717a commit 3c370f6
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 23 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
2 changes: 1 addition & 1 deletion Examples/Fault/B-U585I-IOT02A/Fault.csolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ solution:

packs:
- pack: Keil::STM32U5xx_DFP@2.1.0
- pack: Keil::B-U585I-IOT02A_BSP@1.0.0
- pack: Keil::B-U585I-IOT02A_BSP

target-types:
- type: HW
Expand Down
2 changes: 1 addition & 1 deletion Examples/Fault/B-U585I-IOT02A/NonSecure/Fault_NS.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
</package>
<package name="B-U585I-IOT02A_BSP" schemaVersion="1.7.2" url="https://github.com/MDK-Packs/Pack/raw/master/B-U585I-IOT02A_BSP/" vendor="Keil" version="1.0.0">
<targetInfos>
<targetInfo name="B-U585I-IOT02A" versionMatchMode="fixed"/>
<targetInfo name="B-U585I-IOT02A"/>
</targetInfos>
</package>
<package name="STM32U5xx_DFP" schemaVersion="1.7.15" url="https://www.keil.com/pack/" vendor="Keil" version="2.1.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
2 changes: 1 addition & 1 deletion Examples/Fault/B-U585I-IOT02A/Secure/Fault_S.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
</package>
<package name="B-U585I-IOT02A_BSP" schemaVersion="1.7.2" url="https://github.com/MDK-Packs/Pack/raw/master/B-U585I-IOT02A_BSP/" vendor="Keil" version="1.0.0">
<targetInfos>
<targetInfo name="B-U585I-IOT02A" versionMatchMode="fixed"/>
<targetInfo name="B-U585I-IOT02A"/>
</targetInfos>
</package>
<package name="STM32U5xx_DFP" schemaVersion="1.7.15" url="https://www.keil.com/pack/" vendor="Keil" version="2.1.0">
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
16 changes: 10 additions & 6 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))
#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, __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"
#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 3c370f6

Please sign in to comment.