Hi,
I'm waiting for the UC3B0512 and I saw that it has the reset vector at 0x80000020 instead of 0x80000000;
So I wonder how to change my makefile to fix this bug?
Hi,
I'm waiting for the UC3B0512 and I saw that it has the reset vector at 0x80000020 instead of 0x80000000;
So I wonder how to change my makefile to fix this bug?
I just tried this:
# Flash memories: [{cfi|internal}@address,size]... FLASH = internal@0x80000020,512Kb
but the compiled code still starts from 0x80000000.
so how to fix it?
Use the linker script from the Newlib and set the partnumber to uc3b0512revc.
I heard revD is coming soon (April)
-sma
# Linker script file if any LINKER_SCRIPT = $(UTIL_PATH)/LINKER_SCRIPTS/AT32UC3B/0512/GCC/link_uc3b0512.lds
this is what I tried before.
So what is the path to Newlib uc3b0512revc then?
will revD fix this FLASH issue?
This SF linker script (in(UTIL_PATH)/LINKER_SCRIPTS/AT32UC3B/0512/GCC/link_uc3b0512.lds ) does not contain the workaround. You can however use this linker if you use this special B0512revC trampoline (which will be linked at 0x8000 0000) and does contain the workaround:
\SERVICES\USB\CLASS\DFU\EXAMPLES\ISP\AT32UC3B0512_REVC\boot.S
Newlib linker script is there:
\Program Files\Atmel\AVR Tools\AVR32 Toolchain\avr32\lib\ldscripts\avr32elf_uc3b0512revc.x
-sma
ok, thanks.
I copied the fix into the trampoline I use:
//! @{ //! \verbatim // This must be linked @ 0x80000000 if it is to be run upon reset. .section .reset, "ax", @progbits .global _trampoline .type _trampoline, @function _trampoline: // Workaround for AT32UC3B0512 revC - reset vector is 80000020h rather than 80000000h. Flash gap needs to be programmed with 00000000h. add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 add r0, r0 // Jump to program start. rjmp program_start .org PROGRAM_START_OFFSET program_start: // Jump to the C runtime startup routine. lda.w pc, _stext //! \endverbatim //! @}
now I think this should be no problem for UC3B0256 also.
Yes it will work for the other parts too.
-sma