DSPLIB_CM3 on LPC1769

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

DSPLIB_CM3 on LPC1769

1,083 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tgiacomelli on Wed Sep 28 09:37:07 MST 2011
Hello,

I have a problem that i can't resolve, i hope you can help me.

  In LPCXpresso I have created a simple project to use CMSIS DSP  function on LPC1769 board. Here is my code:
q15_t test1[] = {-32768,32767,-32768,32767};
q15_t test2[] = {-1000,1000,-1000,1000};

q15_t tmp_output[4];

arm_mult_q15(test1, test2, tmp_output, 4u);

  However the execution fails with "UndefInstr" in the Faults register.  The faulty instruction is "smulbb" which appears to be missing on Cortex-M3.
I am disappointed since I have just follow the project creation wizard  to generate it and use DSPLIB_CM3 lib as it is provided by LPCXpresso.

  Could you say me if the LPC1769 support the CMSIS DSP features?
  And if somebody have already use DSPLIB_CM3 in LPCXpresso please send  me your feedback and advise.

Thanks.
0 Kudos
Reply
4 Replies

1,052 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tgiacomelli on Thu Sep 29 02:00:49 MST 2011
The new library have solved the issue, thanks a lot.

In my previous tests I think I built correctly the DSP lib and clean everything, maybe the problem is also in the current library source package.

Anyway, now it works. Thanks!
0 Kudos
Reply

1,052 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Sep 29 01:36:32 MST 2011
Following the previously posted sequence allowed me to successfully run your test code here. I suspect that you either changed the architecture settings for the wrong build configuration, or you did not do a clean of your application project so that the updated library archive got picked up.

Anyway, I've uploaded a fixed version of CMSISv2p00_DSPLIB_CM3 for you to....

http://support.code-red-tech.com/CodeRedWiki/CMSISprojects

Regards,
CodeRedSupport
0 Kudos
Reply

1,052 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tgiacomelli on Thu Sep 29 01:00:26 MST 2011
Hello,

  I have already done this test twice, but it generates the exact same instruction code and fails on smulbb.

Do you know if I have to change something in the build settings to not use these undefined instruction?

Thanks
0 Kudos
Reply

1,052 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Sep 28 10:06:08 MST 2011
Sorry that you have encountered a problem here. It looks like the CMSISv2p00_DSPLIB_CM3 we are currently shipping (including in LPCXpresso 4.1.0) is building for Cortex-M4 rather than Cortex-M3 :(

The fix is simple, and you can do this for yourself...

Ensure that you have imported both CMSISv2p00_DSPLIB_CM3 and CMSISv2p00_DSPLIB_SRC library projectsinto your workspace from the LPCXpresso examples directory.

Select the CMSISv2p00_DSPLIB_SRC project and change the currently selected build configuration to "CM3"

Go to
Project -> Properties -> C/C++ Build -> Settings -> MCU C Compiler -> Target

and change Architecture to "Cortex-M3".

Now rebuild the CM3 build configuration of CMSISv2p00_DSPLIB_SRC. This may take several minutes. At the end of the build, the resulting library archive will be automatically copied into the CMSISv2p00_DSPLIB_CM3 project.

If you then clean your test project and rebuild, you should then pick up the fixed DSPLIB and your code should now run.

Regards,
CodeRedSupport
0 Kudos
Reply