Skip to main content
markbell9
Associate II
May 18, 2012
Question

DC32 Instruction

  • May 18, 2012
  • 1 reply
  • 1335 views
Posted on May 18, 2012 at 21:45

 Hello --

We're trying to bring up FreeRTOS on our STM32F103c8 micro.

In the function vPortStartFirstTask (file portasm.s) there is an SVC call as follows:

cpsie i

    0x8002efe: 0xb662         CPSIE     i

 svc 0

    0x8002f00: 0xdf00         SVC          &sharp0x0

    0x8002f02: 0x0000         MOVS      r0, r0

_?0:

    0x8002f04: 0x200002e8     DC32      pxCurrentTCB

_?1:

    0x8002f08: 0xe000ed08     DC32      VTOR

Immediately after the last assembler statement I end up in the HardFault_Handler.

I know what pxCurrentTCB and VTOR are,  but I can not find what the DC32 means.

Thank you

Mark

#stm32
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    May 18, 2012
    Posted on May 18, 2012 at 21:54

    Define Constant

    Keil/Realview uses DCD

    __Vectors DCD __initial_sp ; Top of Stack
    DCD Reset_Handler ; Reset Handler
    DCD NMI_Handler ; NMI Handler
    DCD HardFault_Handler ; Hard Fault Handler
    ...

    ARM can't load large immediate constants, the assembler places them in ''Literal Pools'' usually past the end of a subroutine, and accesses them with LDR PC Relative instructions.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..