cloning MQX BSP for kinetis in CW10

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

cloning MQX BSP for kinetis in CW10

831 Views
bigredhdl
Contributor I

I'm trying to follow AN4287 about cloning the MQX bsp, but it is written for coldfire and there seems to be some slight differences when doing it for kinetis, mostly related to modifying the project settings in CW.  I tried to make my best guess as to when I should do, but it failed miserably.  Has anyone documented this process for kinetis?

0 Kudos
2 Replies

428 Views
bigredhdl
Contributor I

Here is a list of most places where the kinetis seems to differ from AN4287:

 

Section 3.2 step 1 says “Go to [MQX INSTALLATION]\mqx\build\bsp.”, But figure 24 shows [MQX INSTALLATION]\mqx\source\bsp. I’m assuming the figure is correct.

 

Section 3.4 step 8 shows a line “for %%F in (..\..\..\CUSTOM_BOARD_config\twrmcf52259\*.h) do copy /Y /B ..\..\..\mqx

\source\include\dontchg.h + %%F ..\%%~nF%%~xF” that I don’t see.  Also there are some other differences in the files.  I’m assuming that if I change all directiries that point to twrk60n512 to CUSTOM_BOARD_twrk60n512 and change twrk60n512.h to CUSTOM_BOARD_twrk60n512.h that I will be okay.  Also I was cloning a processor expert BSP and sometimes the .bat file references the non-PE folder and other times it references the PE folder so do I only change the PE folder references?

 

Section 3.5 step 10 – there is no boot.c file in …\mqx\source\bsp\twrk60n512\cw

 

Section 3.7 step 4 – this panel is different for ARM than for coldfire.  There is now “User Path” or “User Recursive Path”.  There is a “Include Search Paths” window, should I change all three entries in this window?

 

Section 3.7 step 8 – On my screen there is also stuff in the Pre-Build steps field

"${ProjDirPath}\..\..\bat\bsp_twrk60n512.bat" "${MQX_ROOT_DIR}\lib\twrk60n512.cw10\bsp" bsp_twrk60n512_d.a”

Should this be changed to

"${ProjDirPath}\..\..\bat\CUSTOM_BOARD_bsp_twrk60n512.bat" "${MQX_ROOT_DIR}\lib\CUSTOM_BOARD_twrk60n512.cw10\bsp" CUSTOM_BOARD_bsp_twrk60n512_d.a” ?

 

Also, the instructions read "${ProjDirPath}\..\..\bat\bsp_CUSTOM_BOARD_mcf52259.bat" "${MQX_PATH}\lib\CUSTOM_BOARD_mcf52259.cw10\mqx"

But figure 41 shows "${ProjDirPath}\..\..\bat\bsp_CUSTOM_BOARD_mcf52259.bat" "${MQX_PATH}\lib\CUSTOM_BOARD_mcf52259.cw10\bsp"

 

Section 3.9 – Why do I change the BSP location, but not the PSP location? 

Also step 8 refers to an MQX Libraries folder that I do not have, but I do see a reference to “Additional Libraris” in the ARM Linker Input settings, do I need to change these? 

Also, the ARM Compiler Input settings have the following entries:

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10/bsp"

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10/psp"

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10"

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10/bsp/Generated_Code"

 

Which ones do I change?

0 Kudos

428 Views
gsanchez
Contributor III

Hi! I expect that you can understand me, my english isn't so good.... :smileywink:

I do for my custom k60 board, I bleieve you can do for yours...

Section 3.2 step 1 says “Go to [MQX INSTALLATION]\mqx\build\bsp.”, But figure 24 shows [MQX INSTALLATION]\mqx\source\bsp. I’m assuming the figure is correct.


You should copy both directories, the one in build\ and the one in source\.

Section 3.4 step 8 shows a line “for %%F in (..\..\..\CUSTOM_BOARD_config\twrmcf52259\*.h) do copy /Y /B ..\..\..\mqx

\source\include\dontchg.h + %%F ..\%%~nF%%~xF” that I don’t see.  Also there are some other differences in the files.  I’m assuming that if I change all directiries that point to twrk60n512 to CUSTOM_BOARD_twrk60n512 and change twrk60n512.h to CUSTOM_BOARD_twrk60n512.h that I will be okay. 

Yes, you should rename every place where you found <original_twrkit> to your <customboard_kinetis> paths.

Section 3.7 step 4 – this panel is different for ARM than for coldfire.  There is now “User Path” or “User Recursive Path”.  There is a “Include Search Paths” window, should I change all three entries in this window?


Here you must go to section "build variables" and select "show system variables", and rename those variables which are pointing to another path. (ProjDirLocation for example)

Section 3.7 step 8 – On my screen there is also stuff in the Pre-Build steps field

"${ProjDirPath}\..\..\bat\bsp_twrk60n512.bat" "${MQX_ROOT_DIR}\lib\twrk60n512.cw10\bsp" bsp_twrk60n512_d.a”

Should this be changed to

"${ProjDirPath}\..\..\bat\CUSTOM_BOARD_bsp_twrk60n512.bat" "${MQX_ROOT_DIR}\lib\CUSTOM_BOARD_twrk60n512.cw10\bsp" CUSTOM_BOARD_bsp_twrk60n512_d.a” ?

Yes, because these were be the "executable" files.

Also, the instructions read "${ProjDirPath}\..\..\bat\bsp_CUSTOM_BOARD_mcf52259.bat" "${MQX_PATH}\lib\CUSTOM_BOARD_mcf52259.cw10\mqx"

But figure 41 shows "${ProjDirPath}\..\..\bat\bsp_CUSTOM_BOARD_mcf52259.bat" "${MQX_PATH}\lib\CUSTOM_BOARD_mcf52259.cw10\bsp"

Only rename that in your codewarrior...

Section 3.9 – Why do I change the BSP location, but not the PSP location?

Also step 8 refers to an MQX Libraries folder that I do not have, but I do see a reference to “Additional Libraris” in the ARM Linker Input settings, do I need to change these?

Also, the ARM Compiler Input settings have the following entries:

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10/bsp"

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10/psp"

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10"

"${MQX_ROOT_DIR}/lib/twrk60n512.cw10/bsp/Generated_Code"

You must change the environment paths in C/C++ General ->  "pahts and symbols"; every variable there you must rename for that which indicates the path in your board.

When you change the variables there, they must update the list in compiler section...

enjoy! =)

kind regards.