J-Link SAM-ICE Boot problem with custom SAM3U1C board in standalone mode.

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

  • J-Link SAM-ICE Boot problem with custom SAM3U1C board in standalone mode.

    Hi guys,

    I developed a relatively simple program for an embedded system using the SAM3U4-EK. The program used the default "getting-started-project" and then i rewrote the main processing loop to fit my purposes, i never touched anything relating to the flashloader. For the actual application i only need the simplest device in the series i.e. SAM3U1C, so i have built a barebones board.

    I have changed the following files to reflect the hardware changes:

    1. flash.icf replaced with equivalent from "asf-standalone-archive-3.2.1\asf-3.2.1\sam\utils\linker_scripts\sam3u\sam3u1\iar\"


    2. device file definitions replaced with ioat91sam3u1.h
    3. flashloader replaced with at91sam3u1-flash.board

    I am using IAR systems embedded workbench.

    If i "download and debug" then the program will run as desired but will not start up standalone i.e. after a power on reset. If i power cycle the device and then go to "debug without downloading" then run the code from the debugger, again it will run fine so i know it is successfully programming the chip.

    The flashloader shows both the extra parameters --flash and --boot, which i believe are all i should need to set the GPNVM bit and ensure that the device will boot. Is there any way to verify that this bit is being set by the programmer?

    Any help you could provide would be greatly appreciated.

    Cheers.

    Dave
  • Hi Dave,

    Do you use the J-Link flashloader or the IAR flashloader?
    If you are using the IAR flashloader, please try out to flash the board via the J-Link flashloader.

    For more information how to configure EWARM for this, please refer to UM08001 (J-Link User Guide), 6.4.1
    segger.com/cms/admin/uploads/p…Docs/UM08001_JLinkARM.pdf


    Best regards
    Alex
    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.
  • I've followed the instructions and used the J-link flashloader.

    Firstly, the options in Project->Download are now greyed out (download active application, download file and erase memory) is this normal?


    I can, however, still do "download and debug."

    Using J-link, when the debug unit starts, the program appears to be loaded into flash but the program counter is set to some erroneous value such that the program is not ready to run from __iar_program_start and hence, the program will not run.

    Using the IAR flashloader, the program always goes to __iar_program_start and can be ran from the debug unit.

    Neither method results in a program that will run in stand alone mode.

    I am currently using firmware version 4.34d and because i'm on a university machine with restricted access to the C:\ drive which can mess up updates etc, i have always said no to the update when prompted but had no issues with the EK. If firmware/dll updates could possibly resolve my issue and should be able to get IT support to perform this.
  • Hi Dave,

    Can you provide the project, so we can give it a check here?
    We have the SAM3UE4-EK in house.


    Best regards
    Alex
    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.
  • Hi,



    I've got a solution. The problem was with the linker not the programming step.



    The SAM3U-EK flash.icf file defines "place at address mem:__ICFEDIT_vector_start__ { readonly section .vectors };"



    However, the SAM3U1 flash.icf provided in ATMELs softpack 1.6 defines "place at address mem:__ICFEDIT_vector_start__ { readonly section .intvec };"



    As .intvec was not defined, the location of my vector table was not as the correct address and only the debugger could start the code. (I assume it bypasses the reset vector in some way).



    Thanks for your assistance.