Dual Core Insanity!

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

Dual Core Insanity!

1,592 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hetech on Tue Oct 28 20:27:28 MST 2014
NXP4337JBD144:-

Firstly the LPCxpresso wizard for creating dual core applications creates projects that do not compile.  I had to manually edit one of the files it creates just to get a blank file to compile
(in the startup file for the m0, // 12 Debug monitor handler IRQ causes the compiler to stop with an error

Secondly, I made a tiny routine that just toggles an output with a counter delay in between, put the similar routine in both cores (running at 204MHz)
(well changed the routine to use a different output etc), and there is a speed difference!  The m0 was actually quicker by 10% (by measuring output square wave with 2 channel CRO)

Thirdly, I created a timer interrupt on the M4, and noticed the M0 now pauses on occasion!  That doesn’t make any sense, as they have separate interrupt controllers!!

-Sam
0 Kudos
Reply
7 Replies

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Nov 14 01:29:29 MST 2014
For your linker errors, please see this FAQ:
http://www.lpcware.com/content/faq/lpcxpresso/linker-undefined-reference
0 Kudos
Reply

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hetech on Thu Nov 13 18:19:43 MST 2014
Different project.  After installing v7.4 and all my projects died, I tried to create a simple LPC1768 project.

Didnt know 2.00 was superceded, I will look into that.

I will checkout the MCU linker settings.
0 Kudos
Reply

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Thu Nov 13 17:23:07 MST 2014

My first question is why this project links in CMSISv2p00_LPC17xx? You mentioned earlier you're using an LPC4337. Note also the 2.00 CMSIS version has been superseded.

The referenced HE696_Debug.ld linker script likely includes memory definition symbols from a separate script, and libraries (i.e. GROUP) from another script. Something in your build references these (undefined) symbols. Unless you need semihost functionality through the debugger, I suggest you link in the nohost libraries. If you're using Managed Linker Scripts you can do this through the IDE:

File->Properties->C/C++ Build->Settings->Tool Settings <tab>->MCU Linker->Managed Linker Script

For the Library entry, you should probably select Redlib (nohost), and apply the change.

Your HE696_Debug_lib.ld script should now show:

GROUP(
libcr_nohost.a
libcr_c.a
libcr_eabihelpers.a
)

This will resolve the undefined symbols.

LessThanZero
0 Kudos
Reply

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hetech on Thu Nov 13 16:39:43 MST 2014
That turned out to be a lot of fun!
I installed v7.4, and now none of my projects are valid (cannot build them).
I created a new project for one of them, and now it doesnt compile!
I dont know what alloc.c and fseek.c are, I am not using them.


make -r all
Building target: HE696.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"F:\NXP\LPCxpresso\CMSISv2p00_LPC17xx\Debug" -L"F:\NXP\LPCxpresso\CMSISv2p00_LPC17xx" -Xlinker -Map="HE696.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "HE696_Debug.ld" -o "HE696.axf"  ./src/HE696.o ./src/cr_startup_lpc175x_6x.o ./src/crp.o ./src/ethmac.o ./src/ew_systick.o ./src/serial.o ./src/tcpip.o   -lCMSISv2p00_LPC17xx
c:/nxp/lpcxpresso_7.4.0_229/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7-m\libcr_c.a(_deferredlazyseek.o): In function `__flsbuf':
_deferredlazyseek.c:(.text.__flsbuf+0x84): undefined reference to `__sys_istty'
c:/nxp/lpcxpresso_7.4.0_229/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7-m\libcr_c.a(_writebuf.o): In function `_Cwritebuf':
_writebuf.c:(.text._Cwritebuf+0x14): undefined reference to `__sys_flen'
_writebuf.c:(.text._Cwritebuf+0x28): undefined reference to `__sys_seek'
_writebuf.c:(.text._Cwritebuf+0x40): undefined reference to `__sys_write'
c:/nxp/lpcxpresso_7.4.0_229/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7-m\libcr_c.a(alloc.o): In function `_Csys_alloc':
alloc.c:(.text._Csys_alloc+0xe): undefined reference to `__sys_write'
alloc.c:(.text._Csys_alloc+0x12): undefined reference to `__sys_appexit'
c:/nxp/lpcxpresso_7.4.0_229/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7-m\libcr_c.a(fseek.o): In function `fseek':
fseek.c:(.text.fseek+0x1a): undefined reference to `__sys_istty'
fseek.c:(.text.fseek+0x44): undefined reference to `__sys_flen'
collect2.exe: error: ld returned 1 exit status
make: *** [HE696.axf] Error 1

09:34:45 Build Finished (took 906ms)
0 Kudos
Reply

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Oct 29 23:56:45 MST 2014
Please use a more recent version of LPCXpresso. v6.1.2 was first released nearly 12 months ago, in November 2013. Our latest version is v7.4 and there have been dozens of fixes and new features compared with v6.

We do not support the Keil non-standard feature. Please read this FAQ on how to place data at specific addresses:
http://www.lpcware.com/content/faq/lpcxpresso/placing-data-address


Quote:
The cores are set to use different banks of flash, and are not executing from RAM the way I have set it up.


You are going to have to explain what you want, what you have done, and what is not working
0 Kudos
Reply

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hetech on Wed Oct 29 15:51:25 MST 2014
Version 6.1.2.177

Screen caps of project creation and errors at:-
http://www.pcbperfection.com/Temp/

GCC used by LPCexpresso does not seam to allow me to assign direct RAM locations for variables (unlike Keil)

The cores are set to use different banks of flash, and are not executing from RAM the way I have set it up.
0 Kudos
Reply

1,566 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Oct 29 01:51:57 MST 2014
1. Could you please tell us what you did to create this project that then failed to build? We run extensive tests on all of the wizards and do not know of any problems.

2. You need to take care of bus contention and be very careful in partitioning your application. Running out of the same flash bank and/or accessing the same memory or peripherals is certainly not recommended as it will cause bus contention and will seriously harm the performance. Please review the User Manual to see how the buses are organised.

3. I don't understand what you mean by 'pause', but again it could be caused by contention.

Please post your example so we can investigate what is wrong with your application.

p.s. Which version of LPCXpresso are you using?
0 Kudos
Reply