[RTEMS Project] #3779: arm_switch_reg undeclared when building libdebugger/rtems-debugger-arm
RTEMS trac
trac at rtems.org
Tue Oct 1 12:13:53 UTC 2019
#3779: arm_switch_reg undeclared when building libdebugger/rtems-debugger-arm
----------------------------+--------------------------
Reporter: Andrei Chichak | Owner: Chris Johns
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: lib/debugger | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: |
----------------------------+--------------------------
Comment (by sprhawk):
I'm new to rtems. I also encountered this problem.
I dig into source code, in
commit:8798372261ed1:cpukit/libdebugger/rtems-debugger-arm.c:83-95:
{{{
#!c
#if !ARM_THUMB_ONLY && defined(__thumb__)
#define ARM_SWITCH_REG uint32_t arm_switch_reg
#define ARM_SWITCH_REG_ASM [arm_switch_reg] "=&r" (arm_switch_reg)
#define ARM_SWITCH_REG_ASM_L ARM_SWITCH_REG_ASM,
#define ASM_ARM_MODE ".align 2\nbx pc\n.arm\n"
#define ASM_THUMB_MODE "add %[arm_switch_reg], pc, #1\nbx
%[arm_switch_reg]\n.thumb\n"
#else
#define ARM_SWITCH_REG
#define ARM_SWITCH_REG_ASM
#define ARM_SWITCH_REG_ASM_L
#define ASM_ARM_MODE
#define ASM_THUMB_MODE
#endif
}}}
here, code for stm32f4 is compiled with flag -mpu cortex-m4, which is
ARM_THUMB_ONLY, __ARM_ARCH_7M__, so above defines will result
ARM_SWITCH_REG to empty.
in line 1592, 1593,
it is defined as
{{{
#!c
#elif defined(ARM_MULTILIB_ARCH_V7M)
#define EXCEPTION_ENTRY_EXC() (void) arm_switch_reg
}}}
when compiled, it will report undeclared identifier arm_switch_reg
--
Ticket URL: <http://devel.rtems.org/ticket/3779#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list