Getting started prob with SES, M7 project

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Getting started prob with SES, M7 project

    I am trying to get familiar with SES by trying some of the demo programs. This is on a custom board with Atmel SAME70 microcontroller. I believe that the hardware is OK since I can program and run code and step in the debugger, via J-Link. However, all the demos blow up very early. For example, the hello world program gets a little ways into vsnprintf, then goes to the hard fault handler. It is usage fault, invalid state. No doubt there is something very simple behind this. Anything obvious to check ?
    George
  • And also that it fails the same way with the Atmel SAME70 Xplained demo board. The fault occurs on a pop.w { r4-r11, pc }, but memory where sp is pointing is all 0. In fact that area of memory has been all 0 since entering main. It looks like the memory is not being written. For example, in the corresponding push.w { r4-r11, lr } the affected memory is not changed after the instruction executes, and at least the LR is not zero.
  • Mystery solved. GPNVM bits 7, 8 in micro were set to map 128K of RAM to ITCM and another 128K to DTCM. That left only 128K available for program RAM, stacks, data. The startup code assumes that the caches are not used at all, so all 384K RAM would be available, and sets the stack pointer at 384K above the ram starting address. The micro specifically does not generate an exception when trying to access RAM that does not exist, unless the MPU is programmed to do so.
  • Hello George,

    Sorry for the delay in response.
    Thank you for pointing this out. The Sample Projects are derived from the CMSIS packs for the MCU vendor.
    Currently there are no "fixed" CMSIS files available. We will bring this to Microchips attention and update to the new packs once available.

    Sorry for any inconveniences caused.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thanks for looking at this. FYI, the way that Atmel handles this in their Studio is to simply set the top of RAM at 128K. That will always work for a demo, even if the GPNVM bits configure 128K each for DTCM and ITCM.
    George