SDK for LPC5526 wrongly configures 4 configPRIO_BITS in FreeRTOSConfig.h in new project

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

SDK for LPC5526 wrongly configures 4 configPRIO_BITS in FreeRTOSConfig.h in new project

1,614 Views
danielholala
Senior Contributor II

Hi there,

based on SDK_2.x_LPC5526 I created a new project using "New Project Wizard" and included "FreeRTOS kernel".

However, FreeRTOSConfig.h in this new project reads as follows:

 

#ifdef __NVIC_PRIO_BITS
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
#define configPRIO_BITS __NVIC_PRIO_BITS
#else
#define configPRIO_BITS 4 /* 15 priority levels */
#endif

 

That's wrong as Cortex-M33 core only uses 3 bits for interrupt priority.

The examples get it right. I assume that I should use an example's FreeRTOSConfig.h as starting point

So why does the New Project Wizard fail to include a correct FreeRTOSConfig.h ?

 

Labels (1)
Tags (4)
0 Kudos
11 Replies

1,597 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

 

Hi danielholala:

 

if you create your project following these steps, using MCUXpresso SDK (Dashboard | MCUXpresso SDK Builder (nxp.com)) to create the principal board and select FreeRTOS, and then, opened it with MCUXpresso IDE and create new project (File --> Project --> import SDK example --> select your own board --> rtos example --> freertos_hello).

 

Ones your project is created, we can search in the FreeRTOSConfig.h, and we can find that it has 3 not 4, in the section of configPRIO_BITS as you can see down.

 

 

Spoiler

#define configPRIO_BITS 3 /* 8 priority levels */

#endif

 

So, maybe you created your project FreeRTOS follow different steps, or different boards. make your projects following the steps that I tell you and you will not have problems in the libraries created with the wizard.

 

I hope this helps.

Best regards

 

Carlos Garabito

0 Kudos

1,587 Views
danielholala
Senior Contributor II

Dear  @CarlosGarabito ,

Thanks for getting back to me!

As a side note: The MCUXpresso IDE manual recommends to install and manage SDKs via the Installed SDKs view. 

danielholala_1-1643355771860.png

 

danielholala_0-1643355618096.png

You suggest to deviate from the manual and to use the MCUXpresso SDK Builder on nxp.com instead. I wonder why this is. I think you should stick to the process that the manual suggests OR if the official recommendation now is to use the SDK Builder, change the manual accordingly.

 

Back to the issue at hand: Of course, I created the project using different steps:

danielholala_2-1643355977039.png

I assume you missed that. Please try again using the "New project..." wizard here:

danielholala_3-1643356247426.png

 

You'll see that completely different code for FreeRTOSConfig.h (at least, haven't checked other files) will be pulled into the new project.

0 Kudos

1,607 Views
danielholala
Senior Contributor II

As I mentioned, the examples get it right.

However, as soon as I select "SDK Management" from the Project Explorer and then "Refresh SDK Components", the wizard offers to replace the example project's FreeRTOSConfig.h (configPRIO_BITS correct) with the template for FreeRTOSConfig.h from the SDK (configPRIO_BITS wrong).

danielholala_0-1643202415777.png

The configuration files do not differ (or only in a few lines) from example to example. The diff to the template is very long. Obviously, the configuration files are not derived from the template configuration file.

That should be fixed.

0 Kudos

1,595 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

Hi again

Maybe you need to write step by step what you are doing in such a way we can see the were is problem.

0 Kudos

1,589 Views
danielholala
Senior Contributor II

Hi @CarlosGarabito ,

I wrote 'based on SDK_2.x_LPC5526 I created a new project using "New Project Wizard" and included "FreeRTOS kernel".'

I assume you are familiar with the use of MCUXpresso IDE, SDKs and project creation. Please see below and tell me, what more information do you need from me?

0 Kudos

1,577 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

Hi @danielholala :

Yes, I do, that's why I tell you the steps that you need to do in the right form to functionality your project, otherwise, we need to see what you are doing that you have a wrong in your project.

Following the steps that you indicate, in my case, works without problems. So, you maybe, need to update your MCUXpress IDE, or update your project in MXUXpress SDK or create a new project in a different workspace.

Have a good day

Carlos Garabito

0 Kudos

1,572 Views
danielholala
Senior Contributor II

Hi Carlos,

obviously you are executing different steps.

You wrote that you did: "create new project (File --> Project --> import SDK example "

That's importing an SDK example. And by the way, you are referring to the "File" menu but there's no "Project" submenu in there.

 

That being said, what I did was using "Quickstart Panel" and there "New project...".

Did you try this?

0 Kudos

1,565 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

Yes, that's right, I forget to put new, so the steps are (create new project (File --> New --> Project -->import SDK example" which is the same as select in quickstart panel to select "import SDK example", my apologies for that. 

By other hand, this blog may help you reaffirm your knowledge about the configuration of configPRIO_BITS  ARM Cortex-M, Interrupts and FreeRTOS: Part 1 | MCU on Eclipse

 

I hope this helps.

 

0 Kudos

1,544 Views
danielholala
Senior Contributor II

Dear @CarlosGarabito ,

For the sake of correctnes: creating a new project and importing an SDK example are two different processes. When you say that you are creating a new project but at the same time recite steps import an SDK example your wording is ambiguous. That's not helpful.

Let's look at the User Manual as the reference for wording regarding MCUXpresso IDE:

danielholala_0-1643616541683.png

 

danielholala_1-1643616570853.png

 

Mind you, the issue I'm observing occurs only when you create a new project ("Quickstart Panel -> New Project..."). It does not occur when you import an SDK example.

This is likely a bug. Please try to recreate the issue that I'm observing. If you can confirm then forward the report to the SDK team.

Thanks.

 

1,426 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

@danielholala 

The team of MCUXpresso SDK was contacted and they response with the next:

" Issue was fixed within SDK sources.

The fix will be available within the next SDK version update "

Have a good day

Carlos Garabito

1,526 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport

Thanks for your observation, I am writing now to SDK team to check it.

 

Thanks.

0 Kudos