spifi_drv_M4 gcc

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

spifi_drv_M4 gcc

1,403 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by asv-lab on Sat Jan 04 12:13:44 MST 2014
hi guys. i have problem with spifi_drv_M4, please help me. codesourcery compiler arm. error Conflicting CPU architectures 13/0
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(spifi_rom_api.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: error: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(falcon_details.o): Conflicting CPU architectures 13/0
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(amic.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(atmel.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(chi.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(eon.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(esmt.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(giga.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(macronix.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(numonyx.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(spansion.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(sst.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
c:/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:\eclipse_project\cncdriver\lib\spifi_drv_M4.lib(winbond.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
......


Labels (1)
0 Kudos
Reply
3 Replies

1,193 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Mon Jan 13 05:31:31 MST 2014
Here are two projects for LPC1800 and for LPC4300 which use the SPIFI library under LPCXpresso 6.

- Code runs from SPIFI, using the LPC1830/4330 LPCXplorer board
- SPIFI libraries compile without error under GCC
- function spifi_init(...) is used to initialize the SPIFI
- SPIFI speed is set to 90MHz
- some data is programmed into the qSPI
- after successful SPIFI write the application runs into a blinky

Further notes:
- the code example uses the libraries coming with LPCXpresso, these are different to the new structure from LPCOpen. This libs are a little bit outdated and will not be maintained anymore.
- if you are doing any new code development, then you should consider to port the SPIFI setup from this example into the current LPCOpen platform
- NXP will add a SPIFI setup in one of the next LPCOpen releases for LPC1800/4300


Hope this finally helps a little bit,
NXP Support Team
0 Kudos
Reply

1,193 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by asv-lab on Wed Jan 08 22:05:46 MST 2014
thank you
0 Kudos
Reply

1,193 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Tue Jan 07 10:09:37 MST 2014
Hello,

the conflict with the CPU architecture comes from a wrong library. With "wrong" I mean that it is intendend for another CPU.
There is the LPC1800 with a Cortex-M3 and the LPC4300 with Cortex-M4. In principle the code for the Cortex-M3 would run on the Cortex-M4 without any problem, but the linker detects a conflict between the CPU define in your application code and the CPU define in the library.
I think what happened is that the file spifi_drv_M3.lib which has been generated for the Cortex-M3 has simply been renamed to spifi_drv_M4.lib.
You can check that when you open the file with a hex editor and look for the string "--cpu=Cortex-M3".
As a short term solution you can patch that to "--cpu=Cortex-M4", then the conflict should be gone.

The warning about the wchar_t definition is correct, unfortunately the compiler from ARM and the GCC compiler follow different philosophies in this case.
But it shouldn't cause any runtime problems.

I don't know which library file you use, but in this package there is one for the Cortex-M4: http://www.lpcware.com/content/nxpfile/lpc4350apdlzip


Hope this helps to solve the problem.
0 Kudos
Reply