SEMC_1_PERIPHERAL missing from peripherals.h

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SEMC_1_PERIPHERAL missing from peripherals.h

1,908 次查看
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?

标记 (2)
0 项奖励
4 回复数

1,747 次查看
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 项奖励

1,747 次查看
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 项奖励

1,747 次查看
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 项奖励

1,747 次查看
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 项奖励