Guten Morgen, seit einigen Wochen versuche ich nun das SAM7-p256 Board von Olimex zu programmieren. Leider bekomme ich beim Versuch das Board über den USBprog zu programmieren immer " Timeout" Fehler. Dabei habe ich mich an das Bsp bei Yagarto und "Using open Source Tools" von James P Lynch gehalten. Das komische is nun das er bei dem Versuch das ram zu flashen die ganze Zeit "Timeout" Fehler bringt und auch nichts mehr macht, aber bei dem Versuch das flash zu programmieren zwar noch die Fehler bringt, aber nach einer zeit dann eine Erfolgsmeldung das er das flash programmieren konnte. Ich denke, dass meine config-files falsch sind. Hat vielleicht jemand bereits zu dieser Konstellation funktionierende Files? James P Lynch benutzt bei seinem Bsp. eine main.bin File um diese ins flash zu laden. Leider wird die bei dem Bsp von Yagarto nich erstellt und Eclipse bringt beim Versuch das Bsp zu compilieren den Fehler error: no memory region specified for loadable section `.eh_frame' wie er bereits auf der Seite von Yagarto erklärt wird. Leider will es mir nicht gelingen die fehlenden Zeilen wie hier http://www.yagarto.de/index.html#download beschrieben einzufügen. Gibt es auch eine andere Möglichkeit diese .bin File zu erzeugen? Hier meine config für ram: #daemon configuration telnet_port 4444 gdb_port 3333 #interface interface usbprog jtag_speed 2 #use combined on interfaces or targets that can't set TRST/SRST separately reset_config trst_and_srst srst_pulls_trst #jtag scan chain #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) jtag_device 4 0x1 0xf 0xe #target configuration daemon_startup reset #target <type> <startup mode> #target arm7tdmi <reset mode> <chainpos> <endianness> <variant> target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4 run_and_halt_time 0 30 working_area 0 0x40000000 0x40000 nobackup #flash bank at91sam7 0 0 0 0 <target#> flash bank at91sam7 0 0 0 0 0 und die für das flash mit dem Skript -------------------------------------------------------------------- #define our ports telnet_port 4444 gdb_port 3333 #interface interface usbprog jtag_speed 2 #use combined on interfaces or targets that can't set TRST/SRST separately reset_config trst_and_srst srst_pulls_trst #jtag_device <IR length> <IR capture> <IR mask> <IDCODE instruction> jtag_device 4 0x1 0xf 0xe #daemon_startup <'attach'|'reset'> daemon_startup reset #target <type> <endianess> <reset_mode> <jtag#> [variant] target arm7tdmi little run_and_init 0 arm7tdmi_r4 #run_and_halt_time <target#> <time_in_ms> run_and_halt_time 0 30 # commands below are specific to AT91sam7 Flash Programming # --------------------------------------------------------- #target_script specifies the flash programming script file target_script 0 reset script.ocd #working_area <target#> <address> <size> <'backup'|'nobackup'> working_area 0 0x40000000 0x40000 nobackup #flash bank at91sam7 0 0 0 0 <target#> flash bank at91sam7 0 0 0 0 0 script ---------------------------------------------------------------- # OpenOCD Target Script for Atmel AT91SAM7S256 # # Programmer: James P Lynch # wait_halt # halt the processor and wait armv4_5 core_state arm # select the core state mww 0xffffff60 0x00320100 # set flash wait state (AT91C_MC_FMR) mww 0xfffffd44 0xa0008000 # watchdog disable (AT91C_WDTC_WDMR) mww 0xfffffc20 0xa0000601 # enable main oscillator (AT91C_PMC_MOR) wait 100 # wait 100 ms mww 0xfffffc2c 0x00480a0e # set PLL register (AT91C_PMC_PLLR) wait 200 # wait 200 ms mww 0xfffffc30 0x7 # set master clock to PLL (AT91C_PMC_MCKR) wait 100 # wait 100 ms mww 0xfffffd08 0xa5000401 # enable user reset AT91C_RSTC_RMR flash write 0 main.bin 0x0 # program the onchip flash reset # reset processor shutdown # stop OpenOCD Hier noch meine Konstellation: -Windows XP -Eclipse -Yagarto -USBprog mit Pegelwandlerplatine -Olimex Sam7-p256 Ich hoffe mir kann jemand helfen ;) Danke schon mal!
Zu dem Problem mit dem Erstellen der .bin Datei bei dem Beispiel von James P Lynch muss die Linker-Datei angepasst werden. Es muss folgender Code eingefügt werden: Siehe http://www.yagarto.de/index.html#download you must add the following part to your linker script: . = ALIGN(4); .eh_frame : { KEEP (*(.eh_frame)) } > ram Kann mir jemand helfen, wo genau dieser stehen muss? Hier die verwendete Linker-Datei ------------------------------------------------------------------------ -- /* identify the Entry Point (_vec_reset is defined in file crt.s) */ ENTRY(_vec_reset) /* specify the AT91SAM7S256 memory areas */ MEMORY { flash : ORIGIN = 0, LENGTH = 256K /* FLASH EPROM */ ram : ORIGIN = 0x00200000, LENGTH = 64K /* static RAM area */ } /* define a global symbol _stack_end (see analysis in annotation above) */ _stack_end = 0xFFFC; /* now define the output sections */ SECTIONS { . = 0; /* set location counter to address zero */ .text : /* collect all sections that should go into FLASH after startup */ { *(.text) /* all .text sections (code) */ *(.rodata) /* all .rodata sections (constants, strings, etc.) */ *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* all .glue_7 sections (no idea what these are) */ *(.glue_7t) /* all .glue_7t sections (no idea what these are) */ _etext = .; /* define a global symbol _etext just after the last code byte */ } >ram /* put all the above into RAM */ .data : /* collect all initialized .data sections that go into RAM */ { _data = .; /* create a global symbol marking the start of the .data section */ *(.data) /* all .data sections */ _edata = .; /* define a global symbol marking the end of the .data section */ } >ram /* put all the above into RAM */ .bss : /* collect all uninitialized .bss sections that go into RAM */ { _bss_start = .; /* define a global symbol marking the start of the .bss section */ *(.bss) /* all .bss sections */ } >ram /* put all the above in RAM (it will be cleared in the startup code */ . = ALIGN(4); /* advance location counter to the next 32-bit boundary */ _bss_end = . ; /* define a global symbol marking the end of the .bss section */ } _end = .; /* define a global symbol marking the end of application RAM */
Das .. . = ALIGN(4); .eh_frame : { KEEP (*(.eh_frame)) } > ram kommt unter SECTIONS.
Danke schon mal. Ist es egal wo unter Sections es stehen muss? (Reihenfolge) Kann es sein dass ich hier noch was ändern muss? . = ALIGN(4); /* advance location counter to the next 32-bit boundary */ _bss_end = . ; /* define a global symbol marking the end of the .bss section */ Mal schaun ob das heute Abend noch klappt ;)
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.