YAGARTO STR7Test working on STR730

I got the YAGARTO sample program STR7Test working on an STR730 board. Besides going through each file to adjust memory settings, I also had to change the way some of the registers are controlled in crt.s . In particular, the STR730 doesn’t have PCU_BOOTCR, PCU_PDIVR and PCU_MDIVR registers. See below for details.

The really nice thing about the YAGARTO sample code is that it doesn’t depend on any particular development board. No board level peripherals are used. All output is accomplished by examining variables in the debugger. This is excellent sample code for a first project.

I tested it with an Embest STDV730F board, an Olimex ARM-JTAG cable, YAGARTO 4.1.1, OpenOCD r131 and Eclipse 3.2.

Following are the memory settings that you need to adjust:

  • RAM base from 0x20000000 to 0xA0000000

    RAM size from 64k to 16k

    Flash base from 0x40000000 to 0x80000000


  • The OpenOCD config should include the following three lines:

    reset_config srst_only
    working_area 0 0xA0003000 0x1000 nobackup
    flash bank str7x 0x80000000 0x00040000 0 0 STR73x 0
    

    crt.s should have the following mods:

  • Change PRCCU_BASE…

    PRCCU_BASE = 0x60000000
    

    Add CFG_BASE…

    CFG_BASE = 0x40000000
    

    Change the section that maps RAM to boot memory…

        LDR    r1, =CFG_BASE
        LDR    r0, [r1]
        BIC    r0, r0, #0x01
        STR    r0, [r1]
    

    Comment out the two sections that set clock prescaling using PCU_PDIVR and PCU_MDIVR.


  • Change the MEMORY section in the linker script…

    MEMORY
    {
      ram : org = 0xA0000000, len = 16k
    }
    

    After you make all of these changes, follow the YAGARTO instructions for getting started at http://www.yagarto.de/howto/yagarto1/index.html .

    Disclaimer: These mods worked for me, although I might have got something wrong that’s not currently causing a problem for me. If you have more experience than I do and you see something wrong, then feel free to comment. Any feedback is appreciated!

    They are all right parameters, I did the same when I used STR730 and I also changed gdb file in which there are some lines that map RAM on 0x0, they are ok only for STR71x, in STR73x you have to do just like you did in your crt.s (if you want I post my gdb file).

    But you can have some problems if you want to load and debug more complicated programs than STR7Test, for example using software library. In this case, I don’t know if the crt.s and the linker files of Yagarto are ok, but I substituted them with other files contained in STR71xUSARTIRQ_wudy, a program that I downloaded from Martin Thomas’s site http://gandalf.arubi.uni-kl.de/avr_proj … index.html

    in the section “STMicroelectronics ARM controller Examples”. In this program you will find linker files, startup files and the Makefile developed from Anglia, so you can use them instead of Yagarto’s files. It works for me. Regards,

    l3golas