Firmware updates are complete for switchless firmware updates via USB!

Have basic testing complete of erasing application/main code, flashing
data, and reading it back for verification.

This ended up being pretty big task to get working.  Some previous
efforts helped out quite a bit though.  The first thing needed was a
path out of the main application and this was done in bootload.c by
calling PREP_FWUPDATE.  That jumps to the fwupdate area (first 2KByte)
of flash.

There the 'fwupate main' takes over.  It updates the usbFunction
Setup/Write ram function pointers to fwupdate's own setup function.
Then it must hijack the processor's execution so once the PREP_UPDATE
exception is complete the processor returns to the fwupdater instead of
the main.  This is done by snooping back through the stack and finding
the stack frame keying off of xPSR and valid PC address.  It then stomps
the PC & LR in the stack frame to steal execution from the main thread.

After that, all usb transfers are handled by the fwupdater.
Able to get buy without the write so far since setup packets provide
data but are also IN transfers to give path for sending data back to
host.  So to keep things small and simple this is all that's handled so
far.  Once I get tired of it being so slow I can implement the
usbFunctionWrite and speed things up quite a bit.  Haven't actually
timed it yet, but for only 20KByte of data it and not being very
frequent it shouldn't be a big deal.  The more I say this the more I'm
thinking I'll add that next because I'll be using it myself so much for
development..  Less time in that state is less likely for ppl to
'semi-brick' their device.

There is of course always the stmicro dfuse demo that can always unbrick
the device.  I tried really hard to jump to their bootloader but no
matter what I did I couldn't get it working.  It was never recognized by
USB.  I half way wonder now if I needed to disable the bootpin which I
never would want to do anyway..

Created separate build_stm folders for INL6 & INL_NES which is what all
the NESmaker kits use.  Also update the make files to be more accurate
about what chip their using since fwupdate tries to prevent a hardfault
from flash access beyond what's available.

This update doesn't include a means of updating the first 2KByte of
firmware updater space itself.  But the application code should be able
to take care of that for us in a future update.  It's only 2KByte so
just temporarily storing the fresh build in SRAM will probably work.
Although will have to be careful about any calls from application code
to fwupdater.  Plus there's always dfuse..

Other problem I ran into was erasing the application code.  It worked
fine early on for all 30KByte.  But as my fwupdater function grew it
crashed when page 18 was erased.  Realized my bigger switch/case
statement was calling a gcc library function that resided in the
application code.  It was only 50Bytes, so moved it to fwupdate section.
Brought 2 of similar library functions over as well, but one of them
disappeared with update to latest version of arm-none-eabi-gcc.

Not a commit really, but this is the release where I updated gcc.  Was
previously:
gcc version 6.2.1 20161205 (release)
[ARM/embedded-6-branch revision 243739]
is now:
gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision
261907] (GNU Tools for Arm Embedded Processors 7-2018-q2-update)

Updating gcc provided a smaller build size of ~250 Bytes from the tail
end.  But it also freed up ~50Bytes in fwupdate space as well.
This commit is contained in:
Paul XPS 2018-11-29 22:31:26 -06:00
parent a8a4e7e1e2
commit e3efe04836
26 changed files with 4842 additions and 1748 deletions

View File

@ -50,14 +50,12 @@ LFLAGS=$(USE_NANO) $(USE_NOHOST) $(LDSCRIPTS) $(GC) $(MAP)
DEFINE+=\
-DSTM32F070x6 \
-DF_CPU=16000000 \
-DF_CPU=48000000 \
-DSTM_CORE \
-DSTM_ADAPTER #stm32 to kazzo adapter board
# -DSTM_INL6 #inlretro 6connector
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DSTM32F072x8 \ #64KB version of all packages (LQFP-48,64,100)
# -DSTM32F070xB \ #128KB version of both packages (LQFP-48,64)
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DF_CPU=8000000
INCLUDE=-I ./include_stm
CFLAGS+= $(DEFINE) $(INCLUDE)

View File

@ -36,6 +36,7 @@ STARTUP=$(BASE)/include_stm/startup_ARM$(CORE).S
# -Os -flto -ffunction-sections -fdata-sections to compile for code size
CFLAGS=$(ARCH_FLAGS) $(STARTUP_DEFS) -Os -flto -ffunction-sections -fdata-sections -g
#CFLAGS=$(ARCH_FLAGS) $(STARTUP_DEFS) -Os -flto -ffunction-sections -fdata-sections -g -fno-exceptions -fno-unwind-tables
#CFLAGS=$(ARCH_FLAGS) $(STARTUP_DEFS) -flto -ffunction-sections -fdata-sections -g
CXXFLAGS=$(CFLAGS)
@ -52,15 +53,13 @@ LFLAGS=$(USE_NANO) $(USE_NOHOST) $(LDSCRIPTS) $(GC) $(MAP)
#TODO fix DF_CPU, now runs at 48Mhz
DEFINE+=\
-DSTM32F070x6 \
-DF_CPU=16000000 \
-DSTM32F070xB \
-DF_CPU=48000000 \
-DSTM_CORE \
-DSTM_INL6 #inlretro 6connector
# -DSTM_ADAPTER #stm32 to kazzo adapter board
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DSTM32F072x8 \ #64KB version of all packages (LQFP-48,64,100)
# -DSTM32F070xB \ #128KB version of both packages (LQFP-48,64)
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DF_CPU=8000000
INCLUDE=-I ./include_stm
CFLAGS+= $(DEFINE) $(INCLUDE)

View File

@ -51,16 +51,14 @@ LDSCRIPTS=-L. -L$(BASE)/include_stm -T nokeep.ld
LFLAGS=$(USE_NANO) $(USE_NOHOST) $(LDSCRIPTS) $(GC) $(MAP)
DEFINE+=\
-DSTM32F070x6 \
-DF_CPU=16000000 \
-DSTM32F070xB \
-DF_CPU=48000000 \
-DSTM_CORE \
-DSTM_INL6_PROTO #inlretro 6connector prototype
# -DSTM_INL6 #inlretro 6connector
# -DSTM_ADAPTER #stm32 to kazzo adapter board
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DSTM32F072x8 \ #64KB version of all packages (LQFP-48,64,100)
# -DSTM32F070xB \ #128KB version of both packages (LQFP-48,64)
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DF_CPU=8000000
INCLUDE=-I ./include_stm
CFLAGS+= $(DEFINE) $(INCLUDE)

View File

@ -50,15 +50,12 @@ LFLAGS=$(USE_NANO) $(USE_NOHOST) $(LDSCRIPTS) $(GC) $(MAP)
DEFINE+=\
-DSTM32F070x6 \
-DF_CPU=8000000 \
-DF_CPU=4800000 \
-DSTM_CORE \
-DSTM_NES #stm32 with NES connector only v2.0N (070C6T6)
# -DSTM_ADAPTER #stm32 to kazzo adapter board
# -DSTM_INL6 #inlretro 6connector
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DSTM32F072x8 \ #64KB version of all packages (LQFP-48,64,100)
# -DSTM32F070xB \ #128KB version of both packages (LQFP-48,64)
# -DSTM32F070x6 \ #32KB version of both packages (TSSOP-20,LQFP-48)
# -DF_CPU=8000000
INCLUDE=-I ./include_stm
CFLAGS+= $(DEFINE) $(INCLUDE)

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,948 @@
Archive member included to satisfy reference by file (symbol)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o (__aeabi_unwind_cpp_pr0)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(libunwind.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o) (restore_core_regs)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o) (__gnu_unwind_execute)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o) (abort)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o (exit)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o) (_global_impure_ptr)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o (__libc_init_array)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o) (memcpy)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o (memset)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o) (raise)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o) (_kill_r)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o) (__call_exitprocs)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o) (atexit)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o) (__libc_fini_array)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o) (_malloc_r)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o) (__malloc_lock)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o) (errno)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o) (_sbrk_r)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o) (__register_exitproc)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o) (_free_r)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o) (_getpid)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o) (_kill)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o) (_sbrk)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o) (_exit)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o (__gnu_thumb1_case_uqi)
c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o (__gnu_thumb1_case_uhi)
Allocating common symbols
Common symbol size file
exp_byte 0x1 source/buffer.o (symbol from plugin)
exp_byte_temp 0x1 source/buffer.o (symbol from plugin)
tdo_pin 0x1 source/jtag.o (symbol from plugin)
errno 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
tck_base 0x4 source/jtag.o (symbol from plugin)
tck_pin 0x1 source/jtag.o (symbol from plugin)
addrh 0x4 source/bootload.o (symbol from plugin)
pbje_cmd_update_flag
0x1 source/jtag.o (symbol from plugin)
tms_pin 0x1 source/jtag.o (symbol from plugin)
tdi_base 0x4 source/jtag.o (symbol from plugin)
tdo_base 0x4 source/jtag.o (symbol from plugin)
tdi_pin 0x1 source/jtag.o (symbol from plugin)
raw_bank_status 0x10 source/buffer.o (symbol from plugin)
raw_buffer16 0x200 source/buffer.o (symbol from plugin)
tms_base 0x4 source/jtag.o (symbol from plugin)
Discarded input sections
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
.text 0x00000000 0x60 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.data 0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.bss 0x00000000 0x1c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.init_array 0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.fini_array 0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.eh_frame 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.jcr 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.text 0x00000000 0x78 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
.ARM.extab 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
.ARM.exidx 0x00000000 0x8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
.ARM.attributes
0x00000000 0x1b c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
.text 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.text 0x00000000 0x0 source/bootload.o (symbol from plugin)
.text 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.rodata.oper_info
0x00000000 0x4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.text 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.text 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.text 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.rodata.usb_buff
0x00000000 0x4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.text 0x00000000 0x0 source/buffer.o (symbol from plugin)
.text 0x00000000 0x0 source/ciccom.o (symbol from plugin)
.text 0x00000000 0x0 source/dump.o (symbol from plugin)
.text 0x00000000 0x0 source/flash.o (symbol from plugin)
.text 0x00000000 0x0 source/gameboy.o (symbol from plugin)
.text 0x00000000 0x0 source/gba.o (symbol from plugin)
.text 0x00000000 0x0 source/io.o (symbol from plugin)
.text 0x00000000 0x0 source/jtag.o (symbol from plugin)
.text 0x00000000 0x0 source/main.o (symbol from plugin)
.text 0x00000000 0x0 source/n64.o (symbol from plugin)
.text 0x00000000 0x0 source/nes.o (symbol from plugin)
.text 0x00000000 0x0 source/operation.o (symbol from plugin)
.text 0x00000000 0x0 source/pinport.o (symbol from plugin)
.text 0x00000000 0x0 source/sega.o (symbol from plugin)
.text 0x00000000 0x0 source/snes.o (symbol from plugin)
.text 0x00000000 0x0 source/swim.o (symbol from plugin)
.text 0x00000000 0x0 source/usb.o (symbol from plugin)
.text 0x00000000 0x0 source_stm_only/fwupdate.o (symbol from plugin)
.text 0x00000000 0x0 source_stm_only/hardfault.o (symbol from plugin)
.text 0x00000000 0x0 source_stm_only/stm_init.o (symbol from plugin)
.text 0x00000000 0x0 source_stm_only/usbstm.o (symbol from plugin)
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.ARM.extab 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.data 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.bss 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.ARM.extab 0x00000000 0x0 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
.debug_frame 0x00000000 0x2c4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(libunwind.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(libunwind.o)
.ARM.attributes
0x00000000 0x1e c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(libunwind.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
.debug_frame 0x00000000 0xf4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
.debug_frame 0x00000000 0x28 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
.text.exit 0x00000000 0x20 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
.debug_frame 0x00000000 0x28 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-exit.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
.rodata._global_impure_ptr
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
.text.__libc_init_array
0x00000000 0x48 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
.debug_frame 0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-init.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
.debug_frame 0x00000000 0x30 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
.text.memset 0x00000000 0x94 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
.debug_frame 0x00000000 0x30 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memset.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text._init_signal_r.part.0
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text._init_signal_r
0x00000000 0x1c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text._signal_r
0x00000000 0x3c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text.__sigtramp_r
0x00000000 0x50 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text.signal 0x00000000 0x18 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text._init_signal
0x00000000 0x20 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text.__sigtramp
0x00000000 0x14 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.debug_frame 0x00000000 0xf8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
.debug_frame 0x00000000 0x44 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.text.startup.register_fini
0x00000000 0x18 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.init_array.00000
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.text.__call_exitprocs
0x00000000 0xf8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.debug_frame 0x00000000 0x54 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__call_atexit.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
.text.atexit 0x00000000 0x10 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
.debug_frame 0x00000000 0x28 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-atexit.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
.text.__libc_fini_array
0x00000000 0x34 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
.debug_frame 0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-fini.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.text._malloc_r
0x00000000 0x568 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.bss.__malloc_current_mallinfo
0x00000000 0x28 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.bss.__malloc_max_sbrked_mem
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.bss.__malloc_max_total_mem
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.bss.__malloc_top_pad
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.data.__malloc_av_
0x00000000 0x408 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.data.__malloc_sbrk_base
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.data.__malloc_trim_threshold
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.debug_frame 0x00000000 0x3c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mallocr.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.text.__malloc_lock
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.text.__malloc_unlock
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.debug_frame 0x00000000 0x30 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-mlock.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.text.cleanup_glue
0x00000000 0x1c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.text._reclaim_reent
0x00000000 0x94 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.debug_frame 0x00000000 0x48 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
.text._sbrk_r 0x00000000 0x24 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
.debug_frame 0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-sbrkr.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
.text.__register_exitproc
0x00000000 0xd4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
.debug_frame 0x00000000 0x3c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-__atexit.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.text._malloc_trim_r
0x00000000 0xa0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.text._free_r 0x00000000 0x1bc c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.debug_frame 0x00000000 0x50 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-freer.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
.stab 0x00000000 0x24 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
.debug_frame 0x00000000 0x20 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
.stab 0x00000000 0x18 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
0x24 (size before relaxing)
.debug_frame 0x00000000 0x20 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.text._sbrk 0x00000000 0x1c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.bss.heap_end.4116
0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.debug_frame 0x00000000 0x20 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(sbrk.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
.debug_frame 0x00000000 0x20 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
.eh_frame 0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
.jcr 0x00000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
.ARM.attributes
0x00000000 0x2c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
.text 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.init 0x00000000 0x8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.fini 0x00000000 0x8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.ARM.attributes
0x00000000 0x1e c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
.data 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
.bss 0x00000000 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
Memory Configuration
Name Origin Length Attributes
FLASH 0x08000000 0x00008000 xr
RAM 0x20000000 0x00001800 xrw
*default* 0x00000000 0xffffffff
Linker script and memory map
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/crt0.o
LOAD C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
LOAD source/bootload.o
LOAD C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
LOAD C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
LOAD C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
LOAD C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
LOAD source/buffer.o
LOAD source/ciccom.o
LOAD source/dump.o
LOAD source/flash.o
LOAD source/gameboy.o
LOAD source/gba.o
LOAD source/io.o
LOAD source/jtag.o
LOAD source/main.o
LOAD source/n64.o
LOAD source/nes.o
LOAD source/operation.o
LOAD source/pinport.o
LOAD source/sega.o
LOAD source/snes.o
LOAD source/swim.o
LOAD source/usb.o
LOAD source_stm_only/fwupdate.o
LOAD source_stm_only/hardfault.o
LOAD source_stm_only/stm_init.o
LOAD source_stm_only/usbstm.o
LOAD C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
LOAD C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
START GROUP
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libc.a
END GROUP
START GROUP
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libc.a
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a
END GROUP
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtend.o
LOAD c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtn.o
.text 0x08000000 0x48a8
*(.isr_vector)
.isr_vector 0x08000000 0xc0 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
0x08000000 __isr_vector
*(.usb_driver)
.usb_driver 0x080000c0 0x3bc C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x08000198 USB_IRQHandler
*(.usb_desc)
.usb_desc 0x0800047c 0xb8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
*(.hardfault)
.hardfault 0x08000534 0x2 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
0x08000534 TIM1_CC_IRQHandler
0x08000534 TSC_IRQHandler
0x08000534 ADC1_COMP_IRQHandler
0x08000534 SysTick_Handler
0x08000534 PendSV_Handler
0x08000534 NMI_Handler
0x08000534 I2C1_IRQHandler
0x08000534 RCC_CRS_IRQHandler
0x08000534 SPI1_IRQHandler
0x08000534 TIM6_DAC_IRQHandler
0x08000534 USART3_4_IRQHandler
0x08000534 EXTI2_3_IRQHandler
0x08000534 I2C2_IRQHandler
0x08000534 TIM17_IRQHandler
0x08000534 CEC_CAN_IRQHandler
0x08000534 PVD_VDDIO2_IRQHandler
0x08000534 DMA1_Channel4_5_6_7_IRQHandler
0x08000534 TIM16_IRQHandler
0x08000534 TIM3_IRQHandler
0x08000534 EXTI4_15_IRQHandler
0x08000534 DMA1_Channel1_IRQHandler
0x08000534 Default_Handler
0x08000534 TIM14_IRQHandler
0x08000534 TIM7_IRQHandler
0x08000534 TIM15_IRQHandler
0x08000534 EXTI0_1_IRQHandler
0x08000534 SPI2_IRQHandler
0x08000534 SVC_Handler
0x08000534 RTC_IRQHand
0x08000534 WWDG_IRQHandler
0x08000534 TIM2_IRQHandler
0x08000534 DEF_IRQHandler
0x08000534 DMA1_Channel2_3_IRQHandler
0x08000534 USART2_IRQHandler
0x08000534 FLASH_IRQHandler
0x08000534 USART1_IRQHandler
0x08000534 TIM1_BRK_UP_TRG_COM_IRQHandler
*fill* 0x08000536 0x2
.hardfault 0x08000538 0xc C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x08000538 HardFault_Handler
*_thumb1_case_uqi.o()
.text 0x08000544 0x14 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
0x08000544 __gnu_thumb1_case_uqi
.ARM.attributes
0x08000558 0x1e c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uqi.o)
*_thumb1_case_shi.o()
*_thumb1_case_uhi.o()
*fill* 0x08000576 0x2
.text 0x08000578 0x14 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
0x08000578 __gnu_thumb1_case_uhi
.ARM.attributes
0x0800058c 0x1e c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(_thumb1_case_uhi.o)
*(.fw_update)
*fill* 0x080005aa 0x2
.fw_update 0x080005ac 0x160 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x00000780 . = 0x780
*fill* 0x0800070c 0x74
*(.fw_up_main)
.fw_up_main 0x08000780 0x60 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x08000780 fwupdate_forever
0x00000800 . = 0x800
*fill* 0x080007e0 0x20
*(.reset_handler)
.reset_handler
0x08000800 0x3c C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
0x08000800 Reset_Handler
*(.usbFuncWrite)
.usbFuncWrite 0x0800083c 0x48 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x0800083c usbFunctionWrite
*(.usbFuncSetup)
.usbFuncSetup 0x08000884 0x13d8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x08000884 usbFunctionSetup
*(.text*)
.text.pbje_scan
0x08001c5c 0xb0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.text.pbje_state_change
0x08001d0c 0x5c C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.text.write_page_verify
0x08001d68 0x68 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.text.write_page
0x08001dd0 0x34 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.text.get_next_buff
0x08001e04 0x54 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.text.discrete_exp0_prgrom_wr
0x08001e58 0x8c C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
0x08001e58 discrete_exp0_prgrom_wr
.text.jtag_init_pbje
0x08001ee4 0x44 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
0x08001ee4 jtag_init_pbje
.text.jtag_run_pbje.part.0
0x08001f28 0xd8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
0x08001f28 jtag_run_pbje.part.0
.text.io_reset
0x08002000 0x1b0 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
0x08002000 io_reset
.text.startup.main
0x080021b0 0xa04 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
0x080021b0 main
.text.append_pairity
0x08002bb4 0x1e C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
*fill* 0x08002bd2 0x2
.text.nes_cpu_wr
0x08002bd4 0xa8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002bd4 nes_cpu_wr
.text.swim_wotf
0x08002c7c 0xb4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002c7c swim_wotf
.text.swim_rotf
0x08002d30 0xac C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002d30 swim_rotf
.text.delay_us
0x08002ddc 0x16 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002ddc delay_us
*fill* 0x08002df2 0x2
.text.nes_dualport_wr
0x08002df4 0x8c C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002df4 nes_dualport_wr
.text.nes_dualport_rd
0x08002e80 0x80 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002e80 nes_dualport_rd
.text.nes_ppu_wr
0x08002f00 0x90 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002f00 nes_ppu_wr
.text.nes_ppu_rd
0x08002f90 0x84 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08002f90 nes_ppu_rd
.text.cdream_chrrom_flash_wr
0x08003014 0x88 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003014 cdream_chrrom_flash_wr
.text.mmc4_chrrom_flash_wr
0x0800309c 0x74 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x0800309c mmc4_chrrom_flash_wr
.text.mmc3_chrrom_flash_wr
0x08003110 0x44 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003110 mmc3_chrrom_flash_wr
.text.cnrom_chrrom_flash_wr
0x08003154 0x80 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003154 cnrom_chrrom_flash_wr
.text.mmc1_chrrom_flash_wr
0x080031d4 0x60 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x080031d4 mmc1_chrrom_flash_wr
.text.nrom_chrrom_flash_wr
0x08003234 0x44 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003234 nrom_chrrom_flash_wr
.text.nes_cpu_rd
0x08003278 0x88 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003278 nes_cpu_rd
.text.mmc4_prgrom_sop_flash_wr
0x08003300 0x54 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003300 mmc4_prgrom_sop_flash_wr
.text.mmc3_prgrom_flash_wr
0x08003354 0x50 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003354 mmc3_prgrom_flash_wr
.text.unrom_prgrom_flash_wr
0x080033a4 0x64 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x080033a4 unrom_prgrom_flash_wr
.text.mmc1_prgrom_flash_wr
0x08003408 0x50 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003408 mmc1_prgrom_flash_wr
.text.nrom_prgrom_flash_wr
0x08003458 0x44 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x08003458 nrom_prgrom_flash_wr
.text.disc_push_exp0_prgrom_wr
0x0800349c 0x84 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x0800349c disc_push_exp0_prgrom_wr
.text.nes_cpu_page_rd_poll.constprop.17
0x08003520 0xc4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x08003520 nes_cpu_page_rd_poll.constprop.17
.text.nes_ppu_page_rd_poll.constprop.15
0x080035e4 0xbc C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x080035e4 nes_ppu_page_rd_poll.constprop.15
.text.mmc1_wr.constprop.9
0x080036a0 0x22 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x080036a0 mmc1_wr.constprop.9
*fill* 0x080036c2 0x2
.text 0x080036c4 0x4 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
0x080036c4 jump2addr
*fill* 0x080036c8 0x8
.text 0x080036d0 0x154 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
0x080036d0 swim_xfr
.text 0x08003824 0xa38 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
0x08003af4 _Unwind_GetCFA
0x08003af8 __gnu_Unwind_RaiseException
0x08003b4c __gnu_Unwind_ForcedUnwind
0x08003b60 __gnu_Unwind_Resume
0x08003ba8 __gnu_Unwind_Resume_or_Rethrow
0x08003bc4 _Unwind_Complete
0x08003bc8 _Unwind_DeleteException
0x08003bd8 _Unwind_VRS_Get
0x08003c24 _Unwind_VRS_Set
0x08003c70 __gnu_Unwind_Backtrace
0x08003fd0 __aeabi_unwind_cpp_pr0
0x08003fdc __aeabi_unwind_cpp_pr1
0x08003fe8 __aeabi_unwind_cpp_pr2
0x08003ff4 _Unwind_VRS_Pop
.text 0x0800425c 0x144 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(libunwind.o)
0x0800425c __restore_core_regs
0x0800425c restore_core_regs
0x08004288 __gnu_Unwind_Restore_VFP
0x0800428c __gnu_Unwind_Save_VFP
0x08004290 __gnu_Unwind_Restore_VFP_D
0x08004294 __gnu_Unwind_Save_VFP_D
0x08004298 __gnu_Unwind_Restore_VFP_D_16_to_31
0x0800429c __gnu_Unwind_Save_VFP_D_16_to_31
0x080042a0 __gnu_Unwind_Restore_WMMXD
0x080042a4 __gnu_Unwind_Save_WMMXD
0x080042a8 __gnu_Unwind_Restore_WMMXC
0x080042ac __gnu_Unwind_Save_WMMXC
0x080042b0 ___Unwind_RaiseException
0x080042b0 _Unwind_RaiseException
0x080042e0 _Unwind_Resume
0x080042e0 ___Unwind_Resume
0x08004310 _Unwind_Resume_or_Rethrow
0x08004310 ___Unwind_Resume_or_Rethrow
0x08004340 _Unwind_ForcedUnwind
0x08004340 ___Unwind_ForcedUnwind
0x08004370 ___Unwind_Backtrace
0x08004370 _Unwind_Backtrace
.text 0x080043a0 0x3a8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
0x080043f4 __gnu_unwind_execute
0x080046f0 __gnu_unwind_frame
0x08004718 _Unwind_GetRegionStart
0x08004724 _Unwind_GetLanguageSpecificData
0x08004738 _Unwind_GetTextRelBase
0x08004740 _Unwind_GetDataRelBase
.text.abort 0x08004748 0x10 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-abort.o)
0x08004748 abort
.text.memcpy 0x08004758 0x84 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-memcpy-stub.o)
0x08004758 memcpy
.text._raise_r
0x080047dc 0x5c c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
0x080047dc _raise_r
.text.raise 0x08004838 0x14 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signal.o)
0x08004838 raise
.text._kill_r 0x0800484c 0x28 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
0x0800484c _kill_r
.text._getpid_r
0x08004874 0x8 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-signalr.o)
0x08004874 _getpid_r
.text._getpid 0x0800487c 0x10 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)
0x0800487c _getpid
.text._kill 0x0800488c 0x10 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(kill.o)
0x0800488c _kill
.text._exit 0x0800489c 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(_exit.o)
0x0800489c _exit
*(.init)
.init 0x080048a0 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
0x080048a0 _init
*(.fini)
.fini 0x080048a4 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
0x080048a4 _fini
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend.o *crtend?.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend.o *crtend?.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
*(.eh_frame*)
.glue_7 0x080048a8 0x0
.glue_7 0x080048a8 0x0 linker stubs
.glue_7t 0x080048a8 0x0
.glue_7t 0x080048a8 0x0 linker stubs
.vfp11_veneer 0x080048a8 0x0
.vfp11_veneer 0x080048a8 0x0 linker stubs
.v4_bx 0x080048a8 0x0
.v4_bx 0x080048a8 0x0 linker stubs
.iplt 0x080048a8 0x0
.iplt 0x080048a8 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.ARM.extab 0x080048a8 0x30
*(.ARM.extab* .gnu.linkonce.armextab.*)
.ARM.extab 0x080048a8 0x24 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
.ARM.extab 0x080048cc 0xc c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
0x080048d8 __exidx_start = .
.ARM.exidx 0x080048d8 0xd0
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
.ARM.exidx 0x080048d8 0x8 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.ARM.exidx 0x080048e0 0x0 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
0x10 (size before relaxing)
.ARM.exidx 0x080048e0 0x98 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(unwind-arm.o)
0xd8 (size before relaxing)
.ARM.exidx 0x08004978 0x30 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m\libgcc.a(pr-support.o)
0x48 (size before relaxing)
0x080049a8 __exidx_end = .
0x080049a8 __etext = ALIGN (0x4)
.rel.dyn 0x080049a8 0x0
.rel.iplt 0x080049a8 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.data 0x20000000 0x430 load address 0x080049a8
0x20000000 __data_start__ = .
*(vtable)
*(.data*)
.data._impure_ptr
0x20000000 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
0x20000000 _impure_ptr
*fill* 0x20000004 0x4
.data.impure_data
0x20000008 0x428 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-impure.o)
0x20000430 . = ALIGN (0x4)
0x20000430 PROVIDE (__preinit_array_start, .)
*(.preinit_array)
0x20000430 PROVIDE (__preinit_array_end, .)
0x20000430 . = ALIGN (0x4)
0x20000430 PROVIDE (__init_array_start, .)
*(SORT(.init_array.*))
*(.init_array)
0x20000430 PROVIDE (__init_array_end, .)
0x20000430 . = ALIGN (0x4)
0x20000430 PROVIDE (__fini_array_start, .)
*(SORT(.fini_array.*))
*(.fini_array)
0x20000430 PROVIDE (__fini_array_end, .)
0x20000430 . = ALIGN (0x4)
*(.fastrun)
*(.jcr)
0x20000430 . = ALIGN (0x4)
0x20000430 __data_end__ = .
.igot.plt 0x20000430 0x0 load address 0x08004dd8
.igot.plt 0x20000430 0x0 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crtbegin.o
.bss 0x20000430 0x2d8 load address 0x08004dd8
0x20000430 . = ALIGN (0x4)
0x20000430 __bss_start__ = .
*(.bss*)
.bss.addrh 0x20000430 0x4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.bss.bank_table
0x20000434 0x2 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x20000434 bank_table
*fill* 0x20000436 0x2
.bss.buff0 0x20000438 0x14 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x20000438 buff0
.bss.buff1 0x2000044c 0x14 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x2000044c buff1
.bss.buff2 0x20000460 0x14 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x20000460 buff2
.bss.buff3 0x20000474 0x14 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x20000474 buff3
.bss.cur_bank 0x20000488 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x20000488 cur_bank
*fill* 0x20000489 0x3
.bss.cur_buff 0x2000048c 0x4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x2000048c cur_buff
.bss.oper_info_struct
0x20000490 0x20 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x20000490 oper_info_struct
.bss.pbje_command
0x200004b0 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x200004b0 pbje_command
.bss.pbje_data
0x200004b1 0x20 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x200004b1 pbje_data
.bss.pbje_numclk
0x200004d1 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x200004d1 pbje_numclk
.bss.pbje_status
0x200004d2 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x200004d2 pbje_status
.bss.raw_bank_status
0x200004d3 0x10 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
*fill* 0x200004e3 0x1
.bss.raw_buffer16
0x200004e4 0x200 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.bss.rv16.4994
0x200006e4 0x8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.bss.swim_base
0x200006ec 0x4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x200006ec swim_base
.bss.swim_pin 0x200006f0 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x200006f0 swim_pin
.bss.exp_byte 0x200006f1 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.bss.num_buff.5074
0x200006f2 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
*fill* 0x200006f3 0x1
.bss.cur_usb_load_buff
0x200006f4 0x4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x200006f4 cur_usb_load_buff
.bss.incoming_bytes_remain
0x200006f8 0x1 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x200006f8 incoming_bytes_remain
*fill* 0x200006f9 0x1
.bss.rv16.4761
0x200006fa 0x8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
*(COMMON)
*fill* 0x20000702 0x2
COMMON 0x20000704 0x4 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libg.a(lib_a-reent.o)
0x20000704 errno
0x20000708 . = ALIGN (0x4)
0x20000708 __bss_end__ = .
.heap 0x20000708 0x0
0x20000708 __end__ = .
0x20000708 PROVIDE (end, .)
*(.heap*)
.heap 0x20000708 0x0 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
0x20000708 __HeapLimit = .
.stack_dummy 0x20000708 0xc00
*(.stack*)
.stack 0x20000708 0xc00 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
0x20001800 __StackTop = (ORIGIN (RAM) + LENGTH (RAM))
0x20000c00 __StackLimit = (__StackTop - SIZEOF (.stack_dummy))
0x20001800 PROVIDE (__stack, __StackTop)
0x00000001 ASSERT ((__StackLimit >= __HeapLimit), region RAM overflowed with stack)
OUTPUT(build_stm/inlretro_stm.elf elf32-littlearm)
.ARM.attributes
0x00000000 0x28
.ARM.attributes
0x00000000 0x1e c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/thumb/v6-m/crti.o
.ARM.attributes
0x0000001e 0x1b C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.ARM.attributes
0x00000039 0x2f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.ARM.attributes
0x00000068 0x2f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.ARM.attributes
0x00000097 0x2f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.ARM.attributes
0x000000c6 0x2f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.ARM.attributes
0x000000f5 0x21 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.ARM.attributes
0x00000116 0x21 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.comment 0x00000000 0x6e
.comment 0x00000000 0x6e C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x6f (size before relaxing)
.comment 0x0000006e 0x6f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.comment 0x0000006e 0x6f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.comment 0x0000006e 0x6f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_line 0x00000000 0x18ed
.debug_line 0x00000000 0x7c C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.debug_line 0x0000007c 0x835 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_line 0x000008b1 0x6c4 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_line 0x00000f75 0x41b C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_line 0x00001390 0x421 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_line 0x000017b1 0x49 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.debug_line 0x000017fa 0xf3 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.debug_info 0x00000000 0x4014
.debug_info 0x00000000 0x97 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.debug_info 0x00000097 0x10fb C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_info 0x00001192 0x141b C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_info 0x000025ad 0xf84 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_info 0x00003531 0x9b7 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_info 0x00003ee8 0x98 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.debug_info 0x00003f80 0x94 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.debug_abbrev 0x00000000 0xcc0
.debug_abbrev 0x00000000 0x12 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.debug_abbrev 0x00000012 0x308 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_abbrev 0x0000031a 0x3cd C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_abbrev 0x000006e7 0x19f C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_abbrev 0x00000886 0x412 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_abbrev 0x00000c98 0x14 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.debug_abbrev 0x00000cac 0x14 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.debug_aranges 0x00000000 0x228
.debug_aranges
0x00000000 0x28 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.debug_aranges
0x00000028 0x20 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_aranges
0x00000048 0x68 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_aranges
0x000000b0 0xc8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_aranges
0x00000178 0x70 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_aranges
0x000001e8 0x20 C:\Users\paul\AppData\Local\Temp\ccMZoj0e.o
.debug_aranges
0x00000208 0x20 C:\Users\paul\AppData\Local\Temp\ccScmBUX.o
.debug_ranges 0x00000000 0xaf8
.debug_ranges 0x00000000 0x20 C:\Users\paul\AppData\Local\Temp\ccst3R5x.o
.debug_ranges 0x00000020 0x6b8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_ranges 0x000006d8 0x228 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_ranges 0x00000900 0xb8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_ranges 0x000009b8 0x140 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_loc 0x00000000 0x4133
.debug_loc 0x00000000 0x241b C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_loc 0x0000241b 0xdd5 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_loc 0x000031f0 0x8b8 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_loc 0x00003aa8 0x68b C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.debug_str 0x00000000 0xcdf
.debug_str 0x00000000 0x6c2 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
0x715 (size before relaxing)
.debug_str 0x000006c2 0x235 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
0x4ce (size before relaxing)
.debug_str 0x000008f7 0x18e C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
0x3a9 (size before relaxing)
.debug_str 0x00000a85 0x25a C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
0x546 (size before relaxing)
.debug_frame 0x00000000 0x500
.debug_frame 0x00000000 0x34 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans0.ltrans.o
.debug_frame 0x00000034 0x12c C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans1.ltrans.o
.debug_frame 0x00000160 0x27c C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans2.ltrans.o
.debug_frame 0x000003dc 0x124 C:\Users\paul\AppData\Local\Temp\ccsrSnXZ.ltrans3.ltrans.o
.stabstr 0x00000000 0x76
.stabstr 0x00000000 0x76 c:/arm/gcc-arm-none-eabi-6_2-2016q4-20161216-win32/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libnosys.a(getpid.o)

View File

@ -80,12 +80,33 @@ SECTIONS
/* hardfault & dummy handlers */
*(.hardfault)
/*this contains vital code for fwupdater appears to be some case statement helper..*/
*_thumb1_case_uqi.o /* about 50 bytes */
/* his freinds are 50 Bytes each as well don't seem to be required
* but lets include them for now anyway. Perhaps we can move them
* if we're ~100 bytes short at some point */
*_thumb1_case_shi.o /*this disappeared when updating from gcc version 6.2.1 20161205
*to version 7.3.1 20180622 but we'll keep it here anyway */
*_thumb1_case_uhi.o
/* put firmware update code at end of first 2KByte
* should allow for easier updating of that code alone
* by the application code if desired */
*(.fw_update)
/* when created there was about 132 Bytes of free space here */
/* fwupdate main needs to be in a fixed location */
. = 0x0780;
*(.fw_up_main)
/* when created there was about 32Bytes free space here */
/* THIS IS THE END OF THE USB DRIVER & FIRMWARE UDPATER SECTION */
. = 0x0800; /*update the location counter to the 3rd KByte */
/* reset handler fixed to 0x08000800
* that way the vector table should always be accurate */
*(.reset_handler)
@ -101,6 +122,48 @@ SECTIONS
*(.text*)
/* GCC LIBRARIES */
/* Had issues with fwupdater breaking when my switch case got so big
* turns out it must have been calling _thumb1_case_uqi.o library function
* because whenever the sector with that library got stomped the mcu went
* to hard fault (code that was being executed got erased)
* 'quick' fix was to move that library function to fw_update section
* went ahead and moved his case freinds as well.
*
* Possible that this issue could arise again if the fwupdate code calls
* other library functions. I was able to move most of them with the
* linker script, but not the libgcc.a ones. Kept getting a linker
* error with .text having both .exidx and .extab sections. Apparently
* these are for some C++ stack unrolling and exception handling
* I don't even think I want these, and the fwupdater certainly shouldn't
* need them. So just leave them were they land normally at the end of .text
* section. If we run out of flash space some day they can probably
* just get left out of the binary. I tried to turn them off but failed..
* don't care anymore, fixed my problem, I've banged my head enough for today
*/
/* *\lib*.a:* */
/* *\libgcc.a:* */
/* these are causing compiler issues, but honestly I don't want them anyway! */
/* some C++ junk about unwinding the stack and raising exeptions. */
/* *unwind-arm.o */
/* *pr-support.o */
/* *libunwind.o */ /*this one is movable I don't think I want it anyway!*/
/* some movable library code that doesn't seem to be relied upon by fwupdater
* if the fwupdater fails at somepoint may want to see if it's calling
* code from these libraries and move them to fwupdate space
*\libg.a:* <- includes things like memcpy
*\libnosys.a:*
*\crti.o:*
*/
/* these got moved to fwupdate section, but so far only the first is used
*_thumb1_case_uqi.o
*_thumb1_case_shi.o
*_thumb1_case_uhi.o
*/
*(.init)
*(.fini)

View File

@ -39,6 +39,15 @@ uint8_t bootload_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8
case JUMP_ADDR: jump2addr((addrh<<16) | (operand)); break;
//device may not respond depending on the address/function being jumped to
case PREP_FWUPDATE: //while we are directly jumping to fwupdate section
//it should be okay if it's in a fixed location
return fwupdate_forever(); break;
//this function hijacked the stack frame to steal execution
//after returing from the current USB ISR
//it returns SUCCESS/ERR depending on if it found and modified
//the stack frame successfully
//leaves main application code for good
//will respond to usb interrupts, but are directed to fwupdater
default:
//opcode doesn't exist
return ERR_UNKN_BOOTLOAD_OPCODE;

View File

@ -5,9 +5,9 @@
#include "shared_dictionaries.h"
#include "shared_errors.h"
#ifdef STM_INL6
#endif //end STM_INL6
#ifdef STM_CORE
#include "../source_stm_only/fwupdate.h"
#endif
uint8_t bootload_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata );

View File

@ -1,7 +1,48 @@
#include "fwupdate.h"
FWUPDATE void erase_main()
#define unlock_flash() FLASH->KEYR = FLASH_KEY1; FLASH->KEYR = FLASH_KEY2
#define lock_flash() FLASH->CR = FLASH_CR_LOCK
// //The FLASH_CR register can be locked again by user software by writing the
// //LOCK bit in the FLASH_CR register to 1.
//flash must be erased prior to calling
FWUPDATE void wr_hword(uint16_t *addr, uint16_t data)
{
//Trying to get by with out a static variable
//writes to the current address of FLASH_AR,
//plus an 8bit address offset.
//the host can set the address by erasing a page
//that's really only useful when starting from a blank page though.
//it can also set the address by writing 0xFFFF to a byte that's already erased
unlock_flash();
//The main Flash memory programming sequence in standard mode is as follows:
// 1.Check that no main Flash memory operation is ongoing by checking the BSY bit in the FLASH_SR register.
while ( FLASH->SR & FLASH_SR_BSY ) { /* forever */ }
// 2. Set the PG bit in the FLASH_CR register.
FLASH->CR = FLASH_CR_PG; //shouldn't need to mask, all other bits clear by default
// 3. Perform the data write (half-word) at the desired address.
*addr = data;
// 4. Wait until the BSY bit is reset in the FLASH_SR register.
while ( FLASH->SR & FLASH_SR_BSY ) { /* forever */ }
// 5. Check the EOP flag in the FLASH_SR register (it is set when the programming operation has succeeded), and then clear it by software.
FLASH->SR = FLASH_SR_EOP;
// Note:The registers are not accessible in write mode when the BSY bit of the FLASH_SR register is set.
lock_flash();
}
FWUPDATE void erase_page(uint16_t page_num_1KB)
{
//usb driver & this code resisdes in first 2KByte of last (0x0800_0800)
//The smaller STMF070C6 has 32KByte of flash, and larger STMF070RB has 128KByte
@ -11,7 +52,360 @@ FWUPDATE void erase_main()
//But they're both leaving the first 2KByte untouched
//And erasing the 30KByte that follows
//For now we're ignoring the extra 96KByte of additional flash that the RB contains
//The program and erase operations can be performed over the whole product voltage range.
//They are managed through the following seven Flash registers:
//
// Key register (FLASH_KEYR)
// Option byte key register (FLASH_OPTKEYR)
// Flash control register (FLASH_CR)
// Flash status register (FLASH_SR)
// Flash address register (FLASH_AR)
// Option byte register (FLASH_OBR)
// Write protection register (FLASH_WRPR)
//
//An ongoing Flash memory operation will not block the CPU as long as the CPU does not access the Flash memory.
//On the contrary, during a program/erase operation to the Flash memory, any attempt to read the Flash memory
//will stall the bus. The read operation will proceed correctly once the program/erase operation has completed.
//This means that code or data fetches cannot be made while a program/erase operation is ongoing.
//
//For program and erase operations on the Flash memory (write/erase), the internal RC oscillator (HSI) must be ON.
//should be running on it right now...
//
//Unlocking the Flash memory
//After reset, the Flash memory is protected against unwanted write or erase operations.
//The FLASH_CR register is not accessible in write mode, except for the OBL_LAUNCH bit,
//used to reload the option bits. An unlocking sequence should be written to the FLASH_KEYR
//register to open the access to the FLASH_CR register. This sequence consists of two write operations:
// Write KEY1 = 0x45670123
//FLASH->KEYR = FLASH_KEY1;
// Write KEY2 = 0xCDEF89AB
//FLASH->KEYR = FLASH_KEY2;
unlock_flash();
//
//Any wrong sequence locks up the FLASH_CR register until the next reset.
//In the case of a wrong key sequence, a bus error is detected and a Hard Fault interrupt is generated.
//This is done after the first write cycle if KEY1 does not match, or during the second write cycle if
//KEY1 has been correctly written but KEY2 does not match.
//
//The FLASH_CR register can be locked again by user software by writing the
//LOCK bit in the FLASH_CR register to 1.
//FLASH->CR = FLASH_CR_LOCK;
while(1){
}
//Page Erase
// To erase a page, the procedure below should be followed:
// 1.Check that no Flash memory operation is ongoing by checking the BSY bit in the FLASH_CR register.
// Think they mean the FLASH_SR register...?
// the BSY bit is supposed to clear itself when flash operation is complete, or errored out
// So it should never remain set forever..
while ( FLASH->SR & FLASH_SR_BSY ) { /* forever */ }
// 2. Set the PER bit in the FLASH_CR register.
FLASH->CR = FLASH_CR_PER; //shouldn't need to mask, all other bits clear by default
// 3. Program the FLASH_AR register to select a page to erase.
FLASH->AR = 0x08000000 + (page_num_1KB<<10); //page 2 (3rd KByte)
// 4. Set the STRT bit in the FLASH_CR register (see note below).
FLASH->CR = (FLASH_CR_PER | FLASH_CR_STRT);
// 5. Wait for the BSY bit to be reset.
__asm__ __volatile__ ("nop");
while ( FLASH->SR & FLASH_SR_BSY) { /* forever */ }
// 6. Check the EOP flag in the FLASH_SR register (it is set when the erase operation has succeeded).
// 7. Clear the EOP flag.
FLASH->SR = FLASH_SR_EOP;
// Note:The software should start checking if the BSY bit equals ÎéÎí0ÎéÎí at least one CPU cycle after setting the STRT bit.
//The FLASH_CR register can be locked again by user software by writing the
//LOCK bit in the FLASH_CR register to 1.
lock_flash();
}
FWUPDATE uint8_t fwupdate_call( uint8_t opcode, uint8_t miscdata, uint16_t operand, uint8_t *rdata )
{
#define RD_LEN 0
#define RD0 1
#define RD1 2
#define RD2 3
#define RD3 4
#define BYTE_LEN 1
#define HWORD_LEN 2
#define WORD_LEN 4
//pointer to flash address space
//inialize to the last accessed flash address
uint16_t *flash_addr = (uint16_t *)FLASH->AR;
switch (opcode) {
case ERASE_1KB_PAGE:
#ifdef STM32F070x6
if( (operand>1) && (operand<32)) { //only has 32KByte of flash
#else
if( (operand>1) && (operand<128)) { //RB has 128KByte of flash
#endif
erase_page(operand);
}else{
//don't want to erase ourselves!
//or hardfault
return ERR_FWUPDATE_BAD_ADDR; }
break;
//Don't really want to leave flash in an unlocked state..
// case UNLOCK_FLASH:
// unlock_flash(); break;
//
// case LOCK_FLASH:
// lock_flash(); break;
case WR_HWORD:
//the address is based on previous
//miscdata is the provided offset from last
flash_addr += miscdata;
wr_hword(flash_addr, operand);
break;
case SET_FLASH_ADDR:
//sets FLASH->AR to desired address by writing 0xFFFF to that address
//so it MUST already be erased!
#ifdef STM32F070x6 //only has 32KByte of flash
if (miscdata) { return ERR_FWUPDATE_BAD_ADDR; }
if (operand>0x7FFF) { return ERR_FWUPDATE_BAD_ADDR; }
#else
if (miscdata>1) { return ERR_FWUPDATE_BAD_ADDR; } //only 128KByte of flash
#endif
flash_addr = (uint16_t *) (0x08000000 + (miscdata<<16) + operand);
wr_hword(flash_addr, 0xFFFF);
break;
case GET_FLASH_ADDR:
rdata[RD_LEN] = WORD_LEN;
rdata[RD0] = FLASH->AR;
rdata[RD1] = FLASH->AR>>8;
rdata[RD2] = FLASH->AR>>16;
rdata[RD3] = FLASH->AR>>24;
break;
case GET_FLASH_DATA:
rdata[RD_LEN] = HWORD_LEN;
rdata[RD0] = *flash_addr;
rdata[RD1] = (*flash_addr)>>8;
break;
case READ_FLASH:
#ifdef STM32F070x6 //only has 32KByte of flash
if (miscdata) { return ERR_FWUPDATE_BAD_ADDR; }
if (operand>0x7FFF) { return ERR_FWUPDATE_BAD_ADDR; }
#else
if (miscdata>1) { return ERR_FWUPDATE_BAD_ADDR; } //only 128KByte of flash
#endif
flash_addr = (uint16_t *) (0x08000000 + (miscdata<<16) + operand);
rdata[RD_LEN] = HWORD_LEN;
rdata[RD0] = *flash_addr;
rdata[RD1] = (*flash_addr)>>8;
break;
case RESET_DEVICE:
SCB->AIRCR = 0x05FA0004;
//device will not actually return from this..
//although we could get it to by having it issue reset once back
//in the fwupdate forever loop:
//usbfuncwrite = RESETME;
//shouldn't need this variable till after reset..
//couldn't get that method to work though, so just don't bother returning for now..
break;
default: //opcode doesn't exist
return ERR_UNKN_FWUPDATE_OPCODE;
}
return SUCCESS;
}
FWUPDATE_NOIN uint16_t usb_fwupdate_setup(uint8_t data[8])
{
//cast incoming data to a setup_packet
setup_packet *spacket = (void *)data;
//create a return array for data
static uint16_t rv16[RETURN_BUFF_SIZE/2];
uint8_t *rv = (uint8_t*)rv16;
//create a usbMsgPtr variable from the stack which we can use convienently
//but then at end of the function we'll need to copy the value over to usb_buff usbMsgPtr_H/L
usbMsgPtr_t usbMsgPtr;
rv[RETURN_ERR_IDX] = GEN_FAIL; //default to error till opcode updates.
rv[RETURN_LEN_IDX] = 0; //reset to zero, number of bytes in return data (excluding ERR & LEN)
usbMsgPtr = (usbMsgPtr_t)rv;
uint8_t rlen = (uint8_t) spacket->wLength;
switch(spacket->bRequest) {
case DICT_FWUPDATE:
rv[RETURN_ERR_IDX] = fwupdate_call( spacket->opcode, spacket->miscdata, spacket->operand, &rv[RETURN_LEN_IDX] );
break;
default:
//request (aka dictionary) is unknown
rv[RETURN_ERR_IDX] = ERR_UNKN_DICTIONARY;
}
usbMsgPtr_L = (uint32_t)usbMsgPtr;
usbMsgPtr_H = ((uint32_t)usbMsgPtr)>>16;
return rlen;
}
FWUPDATE_NOIN uint8_t usb_fwupdate_write(uint8_t *data, uint8_t len)
{
}
//This function has a fixed location so the application code knows where to find it
//and it shouldn't change
FWUPMAIN uint8_t fwupdate_forever()
{
//need to turn off any interrupt sources except USB
//TODO turn off WDT
//update usb function pointers to fwupdate functions
//this file is compiled at same time as the the setup/write functions
//so it's okay to refernce them at compile time
usbfuncsetup = (uint32_t) &usb_fwupdate_setup; //should only assign lower 16bits
usbfuncwrite = (uint32_t) &usb_fwupdate_write; //should only assign lower 16bits
//need to return back to the bootloader PREP_FWUPDATE call that got us here
//but when that's done we want to hijack execution so the USB ISR returns here
//instead of the application main
//modify the return PC/LR that's on the stack for the USB interrupt that's
//currently being handled
//
//APSR bits 31-28 NZCV processor flags (could be any value)
//EPSR bit 24 Thumb (should be set)
//IPSR bits 5-0 Exception number (should be zero if not in nested interrupt)
//bits 27-25 & 23-6 should all be cleared for the stacked xPSR
//bit 24 should be set (always in thumb mode)
//bits 5-0 are probably clear if the device was in main (thread mode)
//probably don't want to jump into the fw updater if it wasn't anyway..!
//
//so we don't necessarily know how far the stack pointer has decremented away
//from the current processor stack frame created for the current exception
//
//but if we search back far enough, we'll find stack frame that looks like:
// R0, R1, R2, R3, R12, LR, PC, xPSR
// The PC should be 0x0800_????, and the LR probably is to..?
// PC could be something else if it happened to be executing from RAM
// or we're on a processor with more than 64KByte of flash
// The xPSR should be 0b????0001_00000000_00000000_00000000
//
// we're going to play it safe and require PC == 0x0800???? and the xPSR == 0x?1000000
// we're also going to stop the LR just so it can't cause any troubles
//
// once the PC & LR are hijacked to get back here, we need to return to the
// PREP_FWUPDATE call, and let it know all was well.
asm(
//use r0 as our pointer to the stack
"mov r0, r13\n"
//xPSR has to be atleast 8 words back/up
"add r0, #28\n"
"ldr r2, psr_mask\n"
"ldr r3, psr_expect\n"
"skip_2words:\n"
"add r0, #4\n"
"next_word:\n"
"add r0, #4\n"
"ldr r1, [r0]\n"
"and r1, r1, r2\n"
"sub r1, r1, r3\n"
"bne next_word\n"
//now r0 should be pointing to xPSR
//
//decrement to PC and verify 0x0800????
"ldr r2, pc_mask\n"
"ldr r3, pc_expect\n"
"sub r0, #4\n"
"ldr r1, [r0]\n"
"and r1, r1, r2\n"
"sub r1, r1, r3\n"
"bne skip_2words\n" //the PC didn't match the expected, xPSR must have been false positive
//if we go past the end of SRAM we'll get a hardfault and quit
//PC matched expectation, we've found it!
//stomp the PC and then the LR with
//loop forever PC
"mov r3, pc\n" //pc currently points to next instruction
"add r3, #10\n" //forever loop is 6 instructions ahead of here
//minus one as if the PC was executing the "b done" instruction
//and it should enter at fwupdateloop
//stomp the PC in stack frame
"str r3, [r0]\n"
"sub r0, #4\n"
//stomp the LR in the stack frame
"add r3, #1\n" //LR need to be Thumb
"str r3, [r0]\n"
"b done\n"
"fwupdateloop:\n");
//the forever main loop is here!
//when USB interrupts occur they should return back to here
//if fwupdate is done, intitate system reset
//maybe it's safer to have the user do this by unpluggig the device..?
//Couldn't get this to work for some reason...
//if (usbfuncwrite == RESETME ) {
// SCB->AIRCR = 0x05FA0004;
//}
asm( "b fwupdateloop\n"
".p2align 2\n"
"pc_mask:\n"
".word 0xFFFF0000\n" //bits of the PC we want to match
"pc_expect:\n"
".word 0x08000000\n" //bits of the PC we want to match
"psr_mask:\n"
".word 0x0FFFFFFF\n" //bits of the xPSR we want to match
"psr_expect:\n"
".word 0x01000000\n" //bits of the xPSR we want to match
// "beef:\n"
// ".word 0xBEAD5678\n"
"done:\n"
// "bkpt\n"
);
//return the PREP_FWUPDATE call that got us here
return SUCCESS;
}

View File

@ -5,11 +5,18 @@
//include target chip port definition library files
#include <stm32f0xx.h>
//#define FWUPDATE __attribute__ ((section (".fw_update")))
#define FWUPDATE __attribute__ ((section (".fw_update"), noinline, noclone))
#include "../source/shared_dictionaries.h"
#include "../source/shared_errors.h"
#include "../source/types.h"
#include "usbstm.h"
#define FWUPDATE __attribute__ ((section (".fw_update"))) //allow inline functions
#define FWUPDATE_NOIN __attribute__ ((section (".fw_update"), noinline, noclone)) //separate usb funcs from main
#define FWUPMAIN __attribute__ ((section (".fw_up_main"), noinline, noclone))
void erase_main();
//bootloader in main application needs to be able to call this
//inorder to exit main application code
FWUPMAIN uint8_t fwupdate_forever();
#endif

View File

@ -165,7 +165,7 @@ USBDRIVER void usb_reset_recovery(){
//uint16_t volatile (* const usb_buff)[512] = (void*)USB_PMAADDR;
//this was suggestion by: http://a3f.at/articles/register-syntax-sugar
//which errors on compilation due to assigning of type array
USBDRIVER uint16_t volatile (* const usb_buff) = (void*)USB_PMAADDR;
uint16_t volatile (* const usb_buff) = (void*)USB_PMAADDR;
//static uint16_t num_bytes_req;
@ -756,17 +756,52 @@ USBDRIVER static void control_xfr_init( usbRequest_t *spacket ) {
//but this is where we need to snoop on the setup packet to determine
//if it's a firmware update packet
// if (fwupdate logic) {
//
//this isn't needed anymore though. because the application code
//jumps to the fwupdate main which effectively exits the main application
//then updates our usb function pointers for us.
//
//
// if (spacket->bRequest == DICT_FWUPDATE ) {
// //send this packet to the firmware updater
// erase_main();
// //do this by changing the usbfuncsetup pointer
// usbfuncsetup = (uint32_t) &usb_fwupdate_setup; //should only assign lower 16bits
// //now all setup packets will go to the fwupdater instead of application code
// //we're basically stuck in this condition until a reset which is what we want
// //accidentally jumping to the application code that's not existent would brick us
// //hmmm could have the application code do this for us though instead of slowing down
// //all setup packets..
// //I think I like this idea, use BOOTLOADER dictionary to get it done once
// //rest of update stuff is working
// //other thing that should be protected from is write transfers
//
// //The above was DONE
//
//
// //other thing we need to do is keep the USB ISR from returning to
// //the main function
// //I think this function is inlined with the USB ISR which means the current
// //value in the link register is where the ISR will return to
// asm(
// // "ldr r0, sramconst\n"
// // "mov r13, r0\n"
// // "ldr r0, sramconst+4\n"
// "bkpt\n"
// //"bx r0\n"
// //"mov pc, r0\n"
// //".p2align 2\n"
// //"sramconst:\n"
// ////".word 0xDEADBEEF"
// //".word 0x20001278\n" //MSP for bootloader
// ////".word 0x1FFFC519" //AN2606 note for jumping to bootloader C6
// //".word 0x1FFFCAC5\n" //C6 reset vector
// );
// }
// else { //normal setup packet send to application code
JumpToApplication = (uint16_t (*)(uint8_t data[8])) ((0x08000000)); //base of flash
//application main makes the following assignment at powerup
//usbfuncsetup = (uint32_t) &usbFunctionSetup; //should only assign lower 16bits
JumpToApplication += usbfuncsetup;
// }
JumpToApplication = (uint16_t (*)(uint8_t data[8])) ((0x08000000)); //base of flash
//application main makes the following assignment at powerup
//usbfuncsetup = (uint32_t) &usbFunctionSetup; //should only assign lower 16bits
JumpToApplication += usbfuncsetup;
//perform the actual jump/call
num_bytes_sending = JumpToApplication( (uint8_t*) spacket );

View File

@ -5,6 +5,7 @@
//include target chip port definition library files
#include <stm32f0xx.h>
#include "../source/shared_dictionaries.h"
#include "fwupdate.h"
#define USBDRIVER __attribute__ ((section (".usb_driver")))
@ -98,13 +99,19 @@
#define usbflag usb_buff[USBFLAG] //used for communication between USB driver and main application
//different values for usbflag
// 0x0000 reserved for flag cleared
#define INITUSB 0xA53C
#define INITUSB 0xA53C //used by main application to tell usb driver to initialize itself
//need 4 bytes for setup & write functions, bump the BTABLE another 8Bytes for now...
#define USBFUNCSETUP 8
#define usbfuncsetup usb_buff[USBFUNCSETUP]
#define usbfuncsetup usb_buff[USBFUNCSETUP] //will always be odd (Thumb)
#define USBFUNCWRITE 9
#define usbfuncwrite usb_buff[USBFUNCWRITE]
#define usbfuncwrite usb_buff[USBFUNCWRITE] //will always be odd (Thumb)
// #define RESETME 0x5FA4 //used by fwupdater to signal device to reset itself
//being an even number we know it's a safe value because all funcs are thumb
//#define FWPTR_LO 10
//#define fwptr_lo usb_buff[FWPTR_LO]
//#define FWPTR_HI 11
//#define fwptr_hi usb_buff[FWPTR_HI]
//buffer table itself is located in 1KB buffer above, but it's location is programmable

View File

@ -728,6 +728,60 @@ local function bootload( opcode, operand, misc, data )
end
-- external call for firmware update dictionary
local function fwupdate( opcode, operand, misc, data )
if not op_fwupdate[opcode] then
print("ERROR undefined opcode:", opcode, "must be defined in shared_dict_fwupdate.h")
return nil
end
if not operand then
operand = 0
elseif type(operand) == "string" then
if not op_fwupdate[operand] then
print("ERROR undefined operand:", operand, "must be defined in shared_dict_fwupdate.h")
return nil
end
--decode string operands into
operand = op_fwupdate[operand]
end
if not misc then misc = 0 end
local wLength, ep = default_rlen_1_in(op_fwupdate[opcode.."rlen"])
local count
count, data = usb_vend_xfr(
-- ep, dictionary wValue[misc:opcode] wIndex wLength data
ep, dict["DICT_FWUPDATE"], ( misc<<8 | op_fwupdate[opcode]), operand, wLength, data)
--print(count)
local error_code, data_len
if ep == USB_IN then
error_code = data:byte(RETURN_ERR_IDX)
data_len = data:byte(RETURN_LEN_IDX)
end
--print("error:", error_code, "data_len:", data_len)
assert ( (error_code == err_codes["SUCCESS"]), "\n ERROR!!! problem with opcode: " .. opcode .. " device error code: " .. error_code)
if data_len and data_len ~= (wLength - RETURN_LEN_IDX) then
print("WARNING!! Device's return data length:", data_len, "did not match expected:", wLength-RETURN_LEN_IDX)
end
--process the return data string and return it to calling function
if data_len then
return string_to_int( data:sub(RETURN_DATA, data_len+RETURN_DATA), data_len)
else
return nil
end
end
@ -966,6 +1020,7 @@ op_n64 = {}
op_swim = {}
op_jtag = {}
op_bootload = {}
op_fwupdate = {}
op_ciccom = {}
err_codes = {}
@ -985,6 +1040,7 @@ create_dict_tables( op_n64, "../shared/shared_dict_n64.h")
create_dict_tables( op_swim, "../shared/shared_dict_swim.h")
create_dict_tables( op_jtag, "../shared/shared_dict_jtag.h")
create_dict_tables( op_bootload,"../shared/shared_dict_bootload.h")
create_dict_tables( op_fwupdate,"../shared/shared_dict_fwupdate.h")
create_dict_tables( op_ciccom, "../shared/shared_dict_ciccom.h")
create_dict_tables( err_codes, "../shared/shared_errors.h")
@ -1005,6 +1061,7 @@ dict.buffer = buffer
dict.buffer_payload_in = buffer_payload_in
dict.buffer_payload_out = buffer_payload_out
dict.operation = operation
dict.fwupdate = fwupdate
-- return the module's table
return dict

View File

@ -0,0 +1,156 @@
-- create the module's table
local fwupdate = {}
-- import required modules
local dict = require "scripts.app.dict"
-- file constants
-- local functions
local function erase_main()
--dict.fwupdate("ERASE_1KB_PAGE", 2) --page 0 & 1 (first 2KByte) are forbidden
--dict.fwupdate("ERASE_1KB_PAGE", 3) --this is redundant for RB (aligns C6 to RB when done with above)
--dict.fwupdate("ERASE_1KB_PAGE", 4) --0x0800_1000 - 0x0800_17FF
--dict.fwupdate("ERASE_1KB_PAGE", 5) --redundant RB
--dict.fwupdate("ERASE_1KB_PAGE", 6) --0x0800_1800 - 0x0800_1FFF
--dict.fwupdate("ERASE_1KB_PAGE", 7)
--dict.fwupdate("ERASE_1KB_PAGE", 8) --0x0800_2000 - 0x0800_27FF
--dict.fwupdate("ERASE_1KB_PAGE", 9)
curpage = 2 --skip the first pages
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
while (curpage<32) do
-- while (curpage<128) do
print("erasing page:", curpage)
dict.fwupdate("ERASE_1KB_PAGE", curpage)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
curpage = curpage+1
end
end
local function update_firmware(newbuild)
print("updating")
--enter fwupdate mode
dict.bootload("PREP_FWUPDATE")
--now the device will only respond to FWUPDATE dictionary commands
--open new file
file = assert(io.open(newbuild, "rb"))
--TODO verify first 2KByte matches build
--erase 30KByte of application code
-- erase_main()
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
print("\n");
--advance past the first 2KB of build
dict.fwupdate("ERASE_1KB_PAGE", 30)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
print("\n");
dict.fwupdate("SET_FLASH_ADDR", 0x7912, 0x01)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
-- dict.fwupdate("UNLOCK_FLASH")
dict.fwupdate("WR_HWORD", 0xCC33, 0x00)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
print("\n");
dict.fwupdate("WR_HWORD", 0x1111, 0x01)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
dict.fwupdate("WR_HWORD", 0x2222, 0x01)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
dict.fwupdate("WR_HWORD", 0x4444, 0x02)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
dict.fwupdate("WR_HWORD", 0x7777, 0x03)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
dict.fwupdate("WR_HWORD", 0xAAAA, 0x10)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
dict.fwupdate("WR_HWORD", 0xBBBB, 0x20)
rv = dict.fwupdate("GET_FLASH_ADDR")
print("flash addr:", string.format("%X", rv) )
rv = dict.fwupdate("GET_FLASH_DATA")
print("flash data:", string.format("%X", rv) )
print("\n");
-- dict.fwupdate("LOCK_FLASH")
rv = dict.fwupdate("READ_FLASH", 0x0000, 0x00)
print("read data:", string.format("%X", rv) )
rv = dict.fwupdate("READ_FLASH", 0x053e, 0x00)
print("read data:", string.format("%X", rv) )
rv = dict.fwupdate("READ_FLASH", 0x791a, 0x00)
print("read data:", string.format("%X", rv) )
dict.fwupdate("RESET_DEVICE")
--write build to flash
print("updated")
end
-- global variables so other modules can use them
-- call functions desired to run when script is called/imported
-- functions other modules are able to call
fwupdate.update_firmware = update_firmware
-- return the module's table
return fwupdate

View File

@ -54,6 +54,7 @@ function main ()
local swim = require "scripts.app.swim"
local jtag = require "scripts.app.jtag"
local ciccom = require "scripts.app.ciccom"
local fwupdate = require "scripts.app.fwupdate"
-- local bootload = require "scripts.app.bootload"
-- local crc32 = require "scripts.app.crc32"
@ -67,12 +68,12 @@ function main ()
--local curcart = require "scripts.nes.mmc1"
--local curcart = require "scripts.nes.unrom"
--local curcart = require "scripts.nes.cnrom"
local curcart = require "scripts.nes.mmc3"
--local curcart = require "scripts.nes.mmc3"
--local curcart = require "scripts.nes.mmc2"
--local curcart = require "scripts.nes.mmc4"
--local curcart = require "scripts.nes.mm2"
--local curcart = require "scripts.nes.mapper30"
--local curcart = require "scripts.nes.bnrom"
local curcart = require "scripts.nes.bnrom"
--local curcart = require "scripts.nes.cdream"
--local curcart = require "scripts.nes.cninja"
--local curcart = require "scripts.nes.action53"
@ -88,7 +89,7 @@ function main ()
-- =====================================================
-- USERS: set cart_console to the to point to the mapper script you would like to use here.
-- =====================================================
local cart_console = "NES" --includes Famicom
--local cart_console = "NES" --includes Famicom
--local cart_console = "SNES"
--local cart_console = "SEGA"
--local cart_console = "N64"
@ -143,6 +144,12 @@ function main ()
-- dict.bootload("JUMP_BL")
-- dict.bootload("JUMP_TEST")
-- print("jumped")
--
--Firmware update testing
fwupdate.update_firmware("../firmware/build_stm/inlretro_stm.bin")
-- debug = true
-- rv = cart.detect(debug)
@ -288,7 +295,7 @@ function main ()
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/BBC_nonJW.bin", "ignore/verifyout.bin")
--curcart.process( true, false, false, false, false, "ignore/dump.bin", "ignore/MysticOrigins.prg", "ignore/verifyout.bin")
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/NESmaker.nes", "ignore/verifyout.bin")
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/tb_map30.prg", "ignore/verifyout.bin")
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/tb_map30.prg", "ignore/verifyout.bin")
--COLOR NINJA
@ -363,7 +370,7 @@ function main ()
--BNROM
--curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/lizard_PG.prg", "ignore/verifyout.bin")
--curcart.process( true, true, true, true, true, "ignore/dump.bin", "ignore/lizard_v2.prg", "ignore/verifyout.bin")
curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/lizard_v2.prg", "ignore/verifyout.bin")
--curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/hh85.prg", "ignore/verifyout.bin")
--FME7

View File

@ -23,6 +23,7 @@
#define LOAD_ADDRH 2 //upper address of jump
#define JUMP_ADDR 3 //jump to address upper 16bit provided previous opcode
#define PREP_FWUPDATE 4 //leave main application and sets up for fwupdate
#endif

View File

@ -0,0 +1,66 @@
#ifndef _shared_dict_fwupdate_h
#define _shared_dict_fwupdate_h
//define dictionary's reference number in the shared_dictionaries.h file
//then include this dictionary file in shared_dictionaries.h
//The dictionary number is literally used as usb transfer request field
//the opcodes and operands in this dictionary are fed directly into usb setup packet's wValue wIndex fields
//=============================================================================================
//=============================================================================================
// FIRMWARE UDPATE DICTIONARY
//
// opcodes contained in this dictionary must be implemented in firmware/source_stm_only/fwupdate.c
// dictionary used to control self updating firmware functions
// These commands aren't actually processed by the main application
// they are sniffed out by the device's usb code and handled separately
// this is because we are presumedly erasing the main application code
//
//=============================================================================================
//=============================================================================================
//send the 1KByte page address to be erased CANNOT send page 0 or 1 as this is where usb & fwupdater is
//RB has 2KByte pages so the page numbers are off, and 2KByte will be erased per command
//C6 has 1KByte pages which is more aligned with how this function operates
//The argument is effectively A10-A26 of the mcu memory map starting with offset 0x0800_0000
//ie sending 2 to a C6 erases 0x0800_0800 through 0x0800_0BFF
//ie sending 2 to a RB erases 0x0800_0800 through 0x0800_0FFF
//ie sending 3 to a C6 erases 0x0800_0C00 through 0x0800_0FFF
//ie sending 3 to a RB erases 0x0800_0800 through 0x0800_0FFF (same as 2)
//you can pretend they're the same if you always send the odd page that follows the even
//this will be redundant for the RB erasing the same page twice, but make them behave the same
//you can effectively ignore the odd pages on RB, or pretend the page number is shifted right by 1
#define ERASE_1KB_PAGE 1 //erase any page except the first 2KByte
//Don't actually want to leave the flash in an unlocked state
//it's fast to unlock/lock so just do it before each flash operation
//#define UNLOCK_FLASH 2
//#define LOCK_FLASH 3
#define WR_HWORD 4 //operand = data, miscdata = offset from FLASH->AR
//FLASH->AR seems to drop the upper 16bits of address when flash is unlocked...
//but it's still there apparently when accessed internally for flashing halfwords..?
#define GET_FLASH_ADDR 5 //RL = 6 0-SUCCESS 1-len 2-LSB 3, 4, 5-MSB
//SET FLASH->AR to an address that's currently erased
// 0x08 8bitmiscdata 16bitoperand
// this also unlocks then locks the flash and writes 0xFFFF to the address selected
// C6 only has 32KByte of flash, so miscdata must be zero
// operand MUST BE EVEN! writes must be half word aligned
#define SET_FLASH_ADDR 6 //only works if the
#define GET_FLASH_DATA 7 //RL = 4 0-SUCCESS 1-len 2-LSB 3-MSB
//similar to above, but provide an address, FLASH->AR is unchanged
//can generically read from any flash address
// ADDRESS: 0x08 8bitmiscdata 16bitoperand
// this could be used to dump the entire contents of the flash
#define READ_FLASH 8 //RL = 4 0-SUCCESS 1-len 2-LSB 3-MSB
//device issues system reset to itself
//don't want to do this until the main application has been reprogrammed
#define RESET_DEVICE 9
#endif

View File

@ -270,4 +270,16 @@
//=============================================================================================
//=============================================================================================
//=============================================================================================
#define DICT_FWUPDATE 16
#include "shared_dict_fwupdate.h"
//dictionary used to control self updating firmware functions
//These commands aren't actually processed by the main application
//they are sniffed out by the device's usb code and handled separately
//this is because we are presumedly erasing the main application code
//=============================================================================================
//=============================================================================================
#endif

View File

@ -13,10 +13,14 @@
#define ERR_UNKN_JTAG_OPCODE 135
#define ERR_UNKN_CICCOM_OPCODE 136
#define ERR_UNKN_BOOTLOAD_OPCODE 138
#define ERR_UNKN_FWUPDATE_OPCODE 139
#define ERR_UNKN_PP_OPCODE 140
#define ERR_CTL_PIN_NOT_PRESENT 141
#define ERR_FWUPDATE_BAD_ADDR 142
#define ERR_FWUPDATE_HIJACK_FAIL 143
#define ERR_UNKN_IO_OPCODE 150
#define ERR_UNKN_SWIM_LANE 151
#define ERR_UNKN_JTAG_LANE 152