Zahada GCC (ARM)
Jaroslav Buchta
jaroslav.buchta na hascomp.cz
Úterý Říjen 13 23:48:06 CEST 2015
muze mi nekdo vysvetlit, v cem je rozdil techto dvou prikazovych radku
pro linker?
arm-none-eabi-gcc.exe -mfloat-abi=soft -fdata-sections
-ffunction-sections -Os -DUSE_HAL_DRIVER -DSTM32F051x8
-D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__))
-mthumb -mcpu=cortex-m0 -march=armv6-m -MMD -MP -fmessage-length=0 -Wall
-g3 -o bin\Debug\Demo32F051.elf
obj\debug\drivers\cmsis\device\st\stm32f0xx\source\templates\gcc\startup_stm32f051x8.o
obj\debug\drivers\cmsis\device\st\stm32f0xx\source\templates\system_stm32f0xx.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_adc.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_adc_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_cortex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_dma.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_flash.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_flash_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_gpio.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_pwr.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_pwr_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_rcc.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_rcc_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_uart.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_uart_ex.o
obj\debug\src\main.o obj\debug\src\stm32f0xx_hal_msp.o
obj\debug\src\stm32f0xx_it.o
-Wl,-Map=bin\Debug\Demo32F051.map -specs=nano.specs -Wl,--gc-sections
-lm -ffunction-sections -fdata-sections -mcpu=cortex-m0 -march=armv6-m
-T"SW4STM32\Demo32F051 Configuration\STM32F051K6Ux_FLASH.ld"
Program size (bytes): 8632
Data size (bytes): 112
BSS size (bytes): 1776
------------- a tohoto:
arm-none-eabi-gcc.exe -mfloat-abi=soft -fdata-sections
-ffunction-sections -Os -DUSE_HAL_DRIVER -DSTM32F051x8
-D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__))
-mthumb -mcpu=cortex-m0 -march=armv6-m -MMD -MP -fmessage-length=0 -Wall
-g3
-Wl,-script="SW4STM32\Demo32F051 Configuration\STM32F051K6Ux_FLASH.ld"
-o bin\Debug\Demo32F051.elf
obj\debug\drivers\cmsis\device\st\stm32f0xx\source\templates\gcc\startup_stm32f051x8.o
obj\debug\drivers\cmsis\device\st\stm32f0xx\source\templates\system_stm32f0xx.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_adc.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_adc_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_cortex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_dma.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_flash.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_flash_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_gpio.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_pwr.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_pwr_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_rcc.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_rcc_ex.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_uart.o
obj\debug\drivers\stm32f0xx_hal_driver\src\stm32f0xx_hal_uart_ex.o
obj\debug\src\main.o obj\debug\src\stm32f0xx_hal_msp.o
obj\debug\src\stm32f0xx_it.o
-Wl,-Map=bin\Debug\Demo32F051.map -specs=nano.specs -Wl,--gc-sections
-lm -ffunction-sections -fdata-sections -mcpu=cortex-m0 -march=armv6-m
Program size (bytes): 8916
Data size (bytes): 1084
BSS size (bytes): 1776
-----------------------
Myslim, ze se to lisi jen ve zvyraznenem textu, v prvnim pripade do
option pridano rucne, ve druhem si to tam prida EmBlocks automaticky.
Mel jsem od oka za to, ze by to melo fungovat stejne, ale k -Wl,-script
jsem nenasel nic... zdrojaky a ostatni nastaveni jsou stejna (doufam)
Tollchain je EmBlock bare metal ale nejnovejsi newlib to dela taky
podobne... V druhem pripade sezere pamet nejvic tohle:
*(.data*)
.data.impure_data
0x20000000 0x428 c:/program files
(x86)/emblocks/2.30/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv6-m\libc.a(lib_a-impure.o)
.data._impure_ptr
0x20000428 0x4 c:/program files
(x86)/emblocks/2.30/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv6-m\libc.a(lib_a-impure.o)
0x20000428 _impure_ptr
.data.SystemCoreClock
0x2000042c 0x4
obj\debug\drivers\cmsis\device\st\stm32f0xx\source\templates\system_stm32f0xx.o
0x2000042c SystemCoreClock
0x20000430 . = ALIGN (0x4)
0x20000430 _edata = .
.jcr 0x20000430 0x0 load address 0x08002710
.jcr 0x20000430 0x0 c:/program files
(x86)/emblocks/2.30/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/4.7.3/armv6-m/crtbegin.o
.igot.plt 0x20000430 0x0 load address 0x08002710
.igot.plt 0x00000000 0x0 c:/program files
(x86)/emblocks/2.30/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/4.7.3/armv6-m/crtbegin.o
0x20000430 . = ALIGN (0x4)
v prvnim pripade vypada datova sekce takto, evidentne se pouzije jina
knihovna. Proc?
*(.data*)
.data.SystemCoreClock
0x20000000 0x4
obj\debug\drivers\cmsis\device\st\stm32f0xx\source\templates\system_stm32f0xx.o
0x20000000 SystemCoreClock
.data.impure_data
0x20000004 0x60 c:/program files
(x86)/emblocks/2.30/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv6-m\libc_n.a(lib_a-impure.o)
.data._impure_ptr
0x20000064 0x4 c:/program files
(x86)/emblocks/2.30/share/em_armgcc/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv6-m\libc_n.a(lib_a-impure.o)
0x20000064 _impure_ptr
0x20000068 . = ALIGN (0x4)
0x20000068 _edata = .
---
Tato zpráva byla zkontrolována na viry programem Avast Antivirus.
https://www.avast.com/antivirus
------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://list.hw.cz/pipermail/hw-list/attachments/20151013/16ebf1c3/attachment.html>
Další informace o konferenci Hw-list