ARM Cortex M4 scatter file and program entry

0

I am having issue to run & profile my C build for Cortex M4 with the ARM Workbench IDE (RVCT) profiler. The profiler just hangs and doesn't entry the main function.

Here is my Makefile:

    CPU       = Cortex-M4
    CFLAGS    = --c99 --cpu=$(CPU) -Otime -O3 --min_array_alignment=8

    ifeq "$(CPU)" "Cortex-M4"
        CPPFLAGS += -DCortex_M4
    endif

    LDFLAGS   = --cpu=$(CPU) --info sizes,totals --remove --inline --scatter Cortex-M4.scat 
    DEPFLAGS  = --depend_target $@ --md --no_depend_system_headers --phony_targets --depend $(BUILD)/$*.Td

And this is the scatter file:

FLASH_LOAD 0x0000 0x10000000
{
  VECTORS 0x0 0x400
  {
    * (:gdef:__vectab_stack_and_reset, +FIRST)
    ; Additional region for other vectors would be added here
  }

  ;; Maximum of 256 exceptions (256*4 bytes == 0x400)
  CODE 0x400 FIXED
  {
    * (+RO)
  }

  DATA 0x00140000 0x00800000-0x00140000-0x00008000
  {                     
    * (+RW, +ZI)
  }

  ;; Stack grows downwards
  ARM_LIB_STACK 0x00800000 EMPTY -0x8000
  {
  }

  ;; Heap grows upwards
  ARM_LIB_HEAP 0x00800000 EMPTY 0x0200000
  {
  } 

}

Do I need to give any specific parameters to the Makefile or to the profiler? The profiler has the following settings that I didn't change by default: Heap Base: 0x00000000, Heap Limit: 0x0007c000, Stack Base: 0x00080000

arm
cortex-m

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0