SEMC_1_PERIPHERAL missing from peripherals.h

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

SEMC_1_PERIPHERAL missing from peripherals.h

1,795 Views
jeffthompson
Contributor V

I'm using MCUXpresso 11.01 ConfigTools for the MIMXRT1062DVJ6A and have added the SEMC to my project. The SEMC configuration in the Peripherals tool is the default, except that, under General configuration, I've set  SDRAM configuration/CS pin mux to "MUX RDY pin". The generated peripherals.h file does not define SEMC_1_PERIPHERAL, but the generated peripherals.c file does reference it. Since the file is read-only, I have to make it writable, add the macro definition

/* Definition of peripheral ID */
#define SEMC_1_PERIPHERAL SEMC

and remember to add it back if I make a change that requires the code to be updated.

Have I missed some configuration step that would resulted in the Peripherals tool automatically generating the macro definition?

0 Kudos
4 Replies

1,634 Views
addiyi
NXP Employee
NXP Employee

As workaround in generated peripherals.h add below code:

/* Definition of peripheral ID */
#define SEMC_1_PERIPHERAL SEMC

Adrian

0 Kudos

1,634 Views
jeffthompson
Contributor V

Adrian,

Thanks for the quick response. However, this is the same temporary fix that I mentioned in my original post which, as I also mentioned, has the problem that, if I need to make configuration changes, it will be overwritten by a new peripherals.h file generated by the config tool. So, this is a ConfigTools bug that needs to be resolved.

As a better workaround, I added a definition for SEMC_1_PERIPHERAL to the defined symbols passed to the preprocessor during the build. That should not be affected by ConfigTools updating generated code.

0 Kudos

1,634 Views
addiyi
NXP Employee
NXP Employee

Jeff,

You are right. Also, note that the fix will be included in the next release of Config Tools for MCUXpresso IDE, which will happen in December.

Adrian

0 Kudos

1,634 Views
jeffthompson
Contributor V

Also, the code that is generated to initialize and configure the SEMC discards the const declaration of the respective structures, resulting in compiler warnings.

0 Kudos