user_config.h file not included in C:\Freescale\KSDK_1.2.0\rtos\mqx\mqx\examples\demo project

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

user_config.h file not included in C:\Freescale\KSDK_1.2.0\rtos\mqx\mqx\examples\demo project

Jump to solution
674 Views
davepfaltzgraff
Senior Contributor I

I tried to run the MQX demo project and ran into the errors caused by not having MQX_HAS_TIME_SLICE, MQX_USE_SEMAPHORES, and MQX_USE_LOGS macros defined.

I followed the instructions in the corresponding "Freescale MQX RTOS Example Guide" to add these in the user_config.h file and still had problems.

It was only after I edited the small_ram_config.h file that I was able to compile and run.

It would appear to me that the user_config.h file is not included anywhere in the source code. All I could find was a mention of it in the mqx_cnfg.h file.

0 Kudos
1 Solution
460 Views
davepfaltzgraff
Senior Contributor I

Yes. I'm attaching a copy of  C:\Freescale\KSDK_1.2.0\rtos\mqx\config\common\small_ram_config.h that worked for me.

As I mentioned in the outset, adding the lines in user_config.h didn't work. Just for the record, I also attaching my copy of C:\Freescale\KSDK_1.2.0\rtos\mqx\config\board\frdmk22f\user_config.h

Thanks,

Dave

View solution in original post

0 Kudos
5 Replies
460 Views
Carlos_Musich
NXP Employee
NXP Employee

Thank you David

0 Kudos
460 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi David,

you can find all the user_config.h files for all boards here:

C:\Freescale\KSDK_1.2.0\rtos\mqx\config\board

You can edit the file adding the macros you need and then you must rebuild mqx lib located in the following path:

C:\Freescale\KSDK_1.2.0\rtos\mqx\mqx\build

Best regards,

Carlos

0 Kudos
460 Views
davepfaltzgraff
Senior Contributor I

Hi Carlos,

Sure, the user can dig and find a working solution. At least I was able to it. Note that I didn't say the "right" solution, although they might be one and the same.

My point is that the documentation does not agree with the code. I edited the user_config.h file as you suggested and it did not work. I was forced edit the small_ram_config.h file to get it to work. I don't think that's the intention.

I've said it before and I'm sure I'll be saying it again in the future, but: A product is only as good as the documentation.

Note that if the documentation had agreed with the code, this post and any subsequent discussion would not have been necessary. In how many unrelated threads do questions like these come up?

Regarding this particular example, it would help if your second suggestion would be detailed in the section where recompiling the library is mentioned.

Later,

Dave

0 Kudos
460 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi David,

So you added MQX_HAS_TIME_SLICE, MQX_USE_SEMAPHORES, and MQX_USE_LOGS in small_ram_config.h, then you rebuild mqx lib and your application worked?

Please confirm, if not please let me know what specific changes you did and I will report this to documentation team.

Thank you for your inputs, we really appreciate them.

Regards,

Carlos

0 Kudos
461 Views
davepfaltzgraff
Senior Contributor I

Yes. I'm attaching a copy of  C:\Freescale\KSDK_1.2.0\rtos\mqx\config\common\small_ram_config.h that worked for me.

As I mentioned in the outset, adding the lines in user_config.h didn't work. Just for the record, I also attaching my copy of C:\Freescale\KSDK_1.2.0\rtos\mqx\config\board\frdmk22f\user_config.h

Thanks,

Dave

0 Kudos