mfs_sdcard examples not compiling?

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

mfs_sdcard examples not compiling?

Jump to solution
1,264 Views
michele_novalia
Contributor III

Hi,

 

Again another example that doesn't seem to compile on my CW 10.1 run on Windows 7.

Is that just me?

 

I am trying to implement a sample code using SD card and KwikStik K40x256 (although I read that SD card module in K40 is broken, but I could use TWR-K60N512).

I am trying to compile code shipped in Freescale_MQX_3.7\mfs\examples\sdcard

 

In both cases (mfs_sdcard_twrk40x256 and mfs_sdcard_twrk60n512) I cannot compile the code as CW tells me:


@@"Source/demo.args" -o "Source/demo.obj" -c "L:/Freescale/Freescale_MQX_3.7/mfs/examples/sdcard/demo.c" -MD -gccdepL:/Freescale/CW_MCU_v10.1/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error(L:\Freescale\

Freescale_MQX_3.7\mfs\examples\sdcard\demo.c|54|0|0|2038|0)

=#error This application requires BSPCFG_ENABLE_ESDHC defined non-zero in user_config.h. Please recompile libraries with this option.  >preprocessor #error directive
Errors caused tool to abort.L:\Freescale\CW_MCU_v10.1\gnu\bin\make: *** [Source/demo.obj] Error 1

 

Does that happen to everyone else?

 

also... there is no user_config.h file in the project... what the error is about? where is that value picked from?

 

Thanks,

Mik

 

0 Kudos
1 Solution
833 Views
guyvdb
Contributor I

Mik,

 

You need to recompile the bsp and psp. I am working with the twr-k60n512. My psp and bsp are located in:

 

     MQX 3.7\mqx\build\cw10\bsp_twrk60n512  and MQX 3.7\mqx\build\cw10\psp_twrk60n512 respectivley

 

You can set BSPCFG_ENABLE_ESDHC to 1 in either of the projects as they reference the same file. After making the change recompile both the psp and bsp and they finally the example project.

 

Cheers

 

Guy

 

View solution in original post

0 Kudos
3 Replies
834 Views
guyvdb
Contributor I

Mik,

 

You need to recompile the bsp and psp. I am working with the twr-k60n512. My psp and bsp are located in:

 

     MQX 3.7\mqx\build\cw10\bsp_twrk60n512  and MQX 3.7\mqx\build\cw10\psp_twrk60n512 respectivley

 

You can set BSPCFG_ENABLE_ESDHC to 1 in either of the projects as they reference the same file. After making the change recompile both the psp and bsp and they finally the example project.

 

Cheers

 

Guy

 

0 Kudos
833 Views
michele_novalia
Contributor III

Hi Guy,

 

thansk for the useful explanation.

 

But don't you get another error after that?

I do ge tthe following:

 

L:/Freescale/CW_MCU_v10.1/MCU/ARM_Tools/Command_Line_Tools/mwldarm|Linker|Warning
>Linker command file warning at line 138
>Object "__FLASHX_START_ADDR" has initial value. Assigning it to new location
>may have unexpected side effects
L:/Freescale/CW_MCU_v10.1/MCU/ARM_Tools/Command_Line_Tools/mwldarm|Linker|Error
>Overflow in segment: rom from section: .main_application
>Segment reserved size is: 0x0000fbe0 -- Overflow of: 0x00002c44
L:/Freescale/CW_MCU_v10.1/MCU/ARM_Tools/Command_Line_Tools/mwldarm|Linker|Error
>Link failed.

 

Did you have to change something else in MQX?

 

Thanks,

Mik

0 Kudos
833 Views
michele_novalia
Contributor III

Update:

 

solution is to build for internal flash, not for ram, as described in here:
https://community.freescale.com/thread/84984

 

 

0 Kudos