Skip to content

Commit 177f954

Browse files
keith-packardnashif
authored andcommitted
arm: Use correct macro for z_interrupt_stacks declaration in stack.h
There are two macros for declaring stack arrays: K_KERNEL_STACK_ARRAY_DEFINE: Defines the array, allocating storage and setting the section name K_KERNEL_STACK_ARRAY_EXTERN Declares the name of a stack array allowing code to reference the array which must be defined elsewhere arch/arm/include/aarch32/cortex_m/stack.h was mis-using K_KERNEL_STACK_ARRAY_DEFINE to declare z_interrupt_stacks by sticking 'extern' in front of the macro use. However, when this macro also set the object file section for the symbol, having two of those caused a conflict in the compiler due to the automatic unique name mechanism used for sections to allow unused symbols to be discarded during linking. This patch makes the header use the correct macro. Signed-off-by: Keith Packard <[email protected]>
1 parent 33dbbfb commit 177f954

File tree

1 file changed

+1
-1
lines changed
  • arch/arm/include/aarch32/cortex_m

1 file changed

+1
-1
lines changed

arch/arm/include/aarch32/cortex_m/stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
extern "C" {
2727
#endif
2828

29-
extern K_KERNEL_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS,
29+
K_KERNEL_STACK_ARRAY_EXTERN(z_interrupt_stacks, CONFIG_MP_NUM_CPUS,
3030
CONFIG_ISR_STACK_SIZE);
3131

3232
/**

0 commit comments

Comments
 (0)