
### how to build and write on maple-mini


# make clean all


rm -f -r obj/* | exit 0

arm-none-eabi-gcc.exe (Sourcery CodeBench Lite 2011.09-69) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


src/stm32f1xx/rtc.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/rtc
.o src/stm32f1xx/rtc.c -o obj/rtc.o

src/stm32f1xx/00_vector.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/00_
vector.o src/stm32f1xx/00_vector.c -o obj/00_vector.o

src/stm32f1xx/hndl_dummy.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/hnd
l_dummy.o src/stm32f1xx/hndl_dummy.c -o obj/hndl_dummy.o

src/stm32f1xx/usart3.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/usa
rt3.o src/stm32f1xx/usart3.c -o obj/usart3.o

src/stm32f1xx/tim3.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/tim
3.o src/stm32f1xx/tim3.c -o obj/tim3.o

src/stm32f1xx/main_mmLCD.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/mai
n_mmLCD.o src/stm32f1xx/main_mmLCD.c -o obj/main_mmLCD.o
src/stm32f1xx/main_mmLCD.c: In function 'NULL_putc':
src/stm32f1xx/main_mmLCD.c:94:34: warning: unused parameter 'c' [-Wunused-parame
ter]

src/stm32f1xx/si2c_RTC.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/si2
c_RTC.o src/stm32f1xx/si2c_RTC.c -o obj/si2c_RTC.o

src/stm32f1xx/gpio_mmLCD.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/gpi
o_mmLCD.o src/stm32f1xx/gpio_mmLCD.c -o obj/gpio_mmLCD.o

src/stm32f1xx/01_start.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/01_
start.o src/stm32f1xx/01_start.c -o obj/01_start.o
src/stm32f1xx/01_start.c: In function 'init':
src/stm32f1xx/01_start.c:95:13: warning: assignment makes integer from pointer w
ithout a cast [enabled by default]

src/stm32f1xx/rcc.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/rcc
.o src/stm32f1xx/rcc.c -o obj/rcc.o

src/SysTick.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/Sys
Tick.o src/SysTick.c -o obj/SysTick.o

src/syscalls.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/sys
calls.o src/syscalls.c -o obj/syscalls.o

src/xprintf.c :
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft
-fipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/
stm32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc
-Iinc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSou
rce_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/xpr
intf.o src/xprintf.c -o obj/xprintf.o

Linking...
arm-none-eabi-gcc -mthumb  -mcpu=cortex-m3 -mthumb-interwork -mfloat-abi=soft -f
ipa-sra -I. -std=gnu89 -gdwarf-2 -fno-schedule-insns2 -Os -Wall -Wextra -Isrc/st
m32f1xx -Iinc/stm32f1xx -Isrc -Iinc -I. -Isrc/stm32f1xx -Iinc/stm32f1xx -Isrc -I
inc -I./stm32f1xx -DSTM32F10X_MD -DSTM32F1XX -DHSE_VALUE=8000000 -DSysClockSourc
e_HSE_Xtal -DSysClockPLL_USE -D_CONFIG_USE_EXT_RTC_CLK_ -Wp,-M,-MP,-MT,obj/stm2a
vr_rom.o    obj/rtc.o obj/00_vector.o obj/hndl_dummy.o obj/usart3.o obj/tim3.o o
bj/main_mmLCD.o obj/si2c_RTC.o obj/gpio_mmLCD.o obj/01_start.o obj/rcc.o  obj/Sy
sTick.o obj/syscalls.o obj/xprintf.o --output obj/stm2avr_rom.elf -nostartfiles
-Wl,-Map=obj/stm2avr_rom.map,--cref,--gc-sections -lc -lgcc -Llib  -lm -Tstm32f1
xx.ld

arm-none-eabi-objcopy -S -O ihex obj/stm2avr_rom.elf obj/stm2avr_rom.hex

arm-none-eabi-objdump -h -S -C obj/stm2avr_rom.elf > obj/stm2avr_rom.lst

arm-none-eabi-nm -n obj/stm2avr_rom.elf > obj/stm2avr_rom.sym

arm-none-eabi-size -A -x obj/stm2avr_rom.elf
obj/stm2avr_rom.elf  :
section             size         addr
.text             0x31e4    0x8005000
.data              0x548   0x20000000
.bss               0x130   0x20000548
.comment            0x30          0x0
.ARM.attributes     0x33          0x0
.debug_aranges     0x188          0x0
.debug_info       0x40d4          0x0
.debug_abbrev     0x1260          0x0
.debug_line       0x1377          0x0
.debug_frame       0xcf8          0x0
.debug_str         0xf79          0x0
.debug_loc        0x1e63          0x0
.debug_ranges       0x48          0x0
Total             0xdc0e


#

### write with GDB via openOCD/ST-Link

# arm-none-eabi-gdb obj\\stm2avr_rom.elf -ex 'target remote localhost:3333' -ex 'monitor reset init' -ex 'load' -ex 'cont'
GNU gdb (Sourcery CodeBench Lite 2011.09-69) 7.2.50.20100908-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-mingw32 --target=arm-none-eabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>...
Reading symbols from c:\cygwin\tmp\stm32\mm_clock\obj\stm2avr_rom.elf...done.
Remote debugging using localhost:3333
0x0800016c in ?? ()
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800016c msp: 0x20005000
Loading section .text, size 0x31e4 lma 0x8005000
Loading section .data, size 0x548 lma 0x80081e4
Start address 0x8006230, load size 14124
Transfer rate: 12 KB/sec, 7062 bytes/write.
Continuing.

Program received signal SIGINT, Interrupt.
0x0800016c in ?? ()
(gdb) q
A debugging session is active.

        Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Ending remote debugging.

#
