Hello,
I'm trying to use the mmcau_lib.a contained in the CAU_MMCAU_SW.zip from Freescale.
I'm using a K70 tower board, which has the mmCAU.
I've followed the guidance in the CAU API User's Guide such as:
#define FREESCALE_MMCAU
I get compiler errors in debug, which looks to be expected since the lib is in .a format.
However, I also get an error when I try to run the code from flash. Here is the specific error:
**** Build of configuration MK70FN1M0_INTERNAL_FLASH for project K70CryptoCyclonemax ****
C:\Freescale\CW MCU v10.2\gnu\bin\mingw32-make -j8 all
'Building target: K70CryptoCyclonemax.afx'
'Executing target #7 K70CryptoCyclonemax.afx'
'Invoking: ARM Linker'
"C:/Freescale/CW MCU v10.2/MCU/ARM_Tools/Command_Line_Tools/mwldarm" @@"K70CryptoCyclonemax.args" -o "K70CryptoCyclonemax.afx"
C:/Freescale/CW MCU v10.2/MCU/ARM_Tools/Command_Line_Tools/mwldarm|Linker|Error
(C:\Users\Cory\Documents\CW Workspace\K70CryptoCyclonemax\Sources\main.c|89|0|0|0|0)
=Referenced from "main" in main.obj
>Undefined : "mmcau_des_encrypt"
Errors caused tool to abort.
mingw32-make: *** [K70CryptoCyclonemax.afx] Error 1
C:/Freescale/CW MCU v10.2/MCU/ARM_Tools/Command_Line_Tools/mwldarm|Linker|Error
>Link failed.
I have the cau_api.h in my source files, which has the function prototype for cau_des_encrypt as well as
#define cau_des_encrypt | mmcau_des_encrypt |
Any ideas or suggestions?
Thanks!
Cory
Solved! Go to Solution.
Once I added the mmcau_lib.a in the manner shown below, I am able to compile, link and program the Kinetis K70 with the cau lib.
Here is what I did in CodeWarrior 10.2:
In the CW workspace, right click on the project folder and go to properties.
Under "C/C++ Build" open "Settings"
Under "ARM Linker" click on "Input"
Add the mmcau_lib.a in the "Additional Libraries" window.
Good luck!
For those using the GCC in CW 10.3, the process is slightly different:
In the CW workspace, right click on the project folder and go to properties.
Under "C/C++ Build" open "Settings"
Under "ARM Ltd Windows GCC C Linker" click on "Miscellaneous"
Add the mmcau_lib.a in the "Other objects" window.
Good luck!
:
I just tried this in CW10.6 with a C++ project, and it works as well. I'm using K70. Since mine is C++, I added this to "ARM Ltd Windows GCC C++ Linker":
"${ProjDirPath}/Sources/lib_mmcau.a"
Once I added the mmcau_lib.a in the manner shown below, I am able to compile, link and program the Kinetis K70 with the cau lib.
Here is what I did in CodeWarrior 10.2:
In the CW workspace, right click on the project folder and go to properties.
Under "C/C++ Build" open "Settings"
Under "ARM Linker" click on "Input"
Add the mmcau_lib.a in the "Additional Libraries" window.
Good luck!
Cory, this means it works now? :smileygrin:
That is AWESOME!
PS sorry for the delay on answering your post
Regards!