cancel
Showing results for 
Search instead for 
Did you mean: 

STM32W and SimpleMAC Library

Martin.Sergio
Associate III
Posted on March 19, 2013 at 09:54

The original post was too long to process during our migration. Please click on the attachment to read the original post.
38 REPLIES 38
Martin.Sergio
Associate III
Posted on March 21, 2013 at 09:27

Can anyone help please?

frankmeyer9
Associate II
Posted on March 21, 2013 at 10:17

I don't know your simpleMAC library, but that doesn't seem to be the causing problem.

As you have noticed, the linker is complaining about a

rpath

option. A documentation of Gnu ld, for instance, be found here:

http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html

Alternatively (the better option) is to check the linker documentation of your toolchain.

I think it could help if you post the complete build settings, or alternatively the whole build output.

Martin.Sergio
Associate III
Posted on March 21, 2013 at 13:22

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6bT&d=%2Fa%2F0X0000000brc%2FzqXhS3J3dcvxIR2FCArOw32Fp6VeyjjczvF6ccuU6rI&asPdf=false
frankmeyer9
Associate II
Posted on March 21, 2013 at 13:55

Perhaps not using ld directly, but the gcc driver ?

Like suggested here:

http://stackoverflow.com/questions/14362290/bad-rpath-option-while-trying-to-cross-compile-node-js-for-arm

Posted on March 21, 2013 at 14:55

Been using arm-none-eabi-g++ to do the linking here for GNU 4.6 / 4.7

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Martin.Sergio
Associate III
Posted on March 21, 2013 at 16:05

If i do the same changing LD=arm-none-eabi-ld --> LD=arm-none-eabi-g++  the result is this:

arm-none-eabi-g++ -nostartfiles -static -T \Projects\SimpleMAC\talk\/link.ld -Wl,--gc-sections -L /CodeSourcery/CodeSourcery20120963/arm-none-eabi/lib/thumb2 -L /CodeSourcery/CodeSourcery20120963/lib/gcc/arm-none-eabi/4.7.2/thumb2 -L /SimpleMAC/Binary -o talk.axf obj/talk.o obj/syscalls.o obj/stm32w108xx_it.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_adc.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_clk.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_exti.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_flash.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_gpio.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_misc.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_pwr.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_rst.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_sc.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_slptim.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_tim.o STM32W108xx_StdPeriph_Driver/obj/stm32w108xx_wdg.o STM32W108xx_StdPeriph_Driver/obj/system_stm32w108xx.o Utilities/STM32_EVAL/Common/obj/mbxxx_adc_tsensor.o Utilities/STM32_EVAL/Common/obj/mbxxx_i2c_ee.o Utilities/STM32_EVAL/Common/obj/mbxxx_i2c_lis302dl.o Utilities/STM32_EVAL/MB851/obj/mb851.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/board.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/hal_adc.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/hal_clocks.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/hal_flash.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/hal_uart.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/mfg-token.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/micro.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/micro-common.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/micro-common-internal.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/nvm.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/sleep.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/system-timer.o Utilities/STM32W108xx_HAL_Driver/micro/cortexm3/obj/stm32w108/low_level_init.o -lc -lgcc /SimpleMAC/Binary/simplemac-library.a

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(analogue.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(cal_adc.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(phy-common.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(phy-library.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(phy.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(aes.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(analogue-cell-bias.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(analogue-filter.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(analogue-lna.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(analogue-mod-dac.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(analogue-vco.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(byte-utilities.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: /SimpleMAC/Binary/simplemac-library.a(eui64.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol ResetISR; defaulting to 08000000

arm-none-eabi-objcopy talk.axf -O binary talk.bin

Thanks

frankmeyer9
Associate II
Posted on March 21, 2013 at 16:20

warning: /SimpleMAC/Binary/simplemac-library.a(analogue-mod-dac.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

 

There seem to be a parameter size mismatch - check the wchar_t definition in the library.

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol ResetISR; defaulting to 08000000

 

This routine is usually found in the startup code, provided as assembler code.

I can't find yours...

Martin.Sergio
Associate III
Posted on March 21, 2013 at 16:39

warning: /SimpleMAC/Binary/simplemac-library.a(analogue-mod-dac.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

 

There seem to be a parameter size mismatch - check the wchar_t definition in the library.

This is ST Library, I have no sources of the library

phy-library.h Interface definition for SimpleMAC library functionality.

../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol ResetISR; defaulting to 08000000

 

This routine is usually found in the startup code, provided as assembler code.

I can't find yours...

In the file startup.c exits ResetISR function as i wrote in my first post. In this case, is this file incorrect? When i not include SimpleMac Library everything works fine

frankmeyer9
Associate II
Posted on March 21, 2013 at 17:13

Sorry, you are right, this ResetISR is defined in startup.c.

All other toolchains I know use an asm file here. But I can't see a reason why it shouldn't work.

LIB = -lc -lgcc -simplemac-library

 

This looks suspicious. Do you want to add the simplemac library as link-in library here ?

Usually, the linker assumes libraries named

libNAME.a

. You add a library to the linker with specifying ''

-lNAME

''. So, for example,

-lc

and

-lgcc

are expanded to

libc.a

and

libgcc.a

by the linker, and this are the files looked for.