Is there a way to add a #include or external reference to "generated code" from Config tool?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is there a way to add a #include or external reference to "generated code" from Config tool?

ソリューションへジャンプ
1,455件の閲覧回数
CktDesigner
Contributor IV

I'm attempting to use the MCUXpresso (v11.7.0) Config Tools to set up peripherals for my application.

I'm testing this on MIMXRT1060-EVKB using SDK v2.13.0

I'm attempting to use FlexIO2 with eDMA to parallel shift out an array of data.

Part of the DMA setup is to provide a "reference" address expression for both the Source (memory in my case) and a Destination (FlexIO shiftbuf in my case).

Question 1:

I'd like to use a variable name of the data array to be shifted out as the source address expression.   When the code is produced, this variable name is referenced in "peripherals.c" (as expected), but the compile fails due to the variable not being known.    Is there a way to add a "#include" or an "extern" declaration in the automatically generated code.   I want to avoid having to edit "peripherals.c" every time a change is made.

Question 2:

Are there "pre-defined" names for SHIFTBUFn registers (and other registers) that can be used as the destination/source address expression?

Question 3:

Are there any demos/examples/documentation on how to use the Config tool to create an application (other than the video that just creates a blinking LED)?   All of the SDK demos assume "manual" programming of all of the peripheral/setup registers.   The Config tool is great in that much of this is automated, but it is often confusing when referring to the demos for guidance, as it is unclear what the Config tool has done (versus not done).   This results in lots of time spent reading code (versus just using the Config tool) and effectively defeats the efficiency that the Config tool should provide.

 

Thanks!

 

0 件の賞賛
返信
1 解決策
1,429件の閲覧回数
Lukas_Heczko
NXP Employee
NXP Employee

Hello,

1. Regarding external declaration of addresses:

- In case you use DMA component in Peripherals tool, you can use the external definition settings:

Lukas_Heczko_0-1678885496470.png

- Alternatively, you can use general custom initialization component:

Lukas_Heczko_1-1678885542420.pngLukas_Heczko_2-1678885547659.png

2. Regarding SHIFTBUF register address:

- There is a dedicated FLEXIO_GetShifterBufferAddress() function in the FlexIO SDK driver (file fsl_flexio.c)

- For general purposes, you may use the register mapping in MIMXRT1062.h file to obtain the register address, e.g.: &(((DMA_Type *)DMA0_BASE)->CR)

3. Regarding Config Tools examples:

- You may try the MCUXpresso Config Tools Knowledge Base: https://community.nxp.com/t5/MCUXpresso-Config-Tools/tkb-p/mcuxpresso-config@tkb Otherwise, there is actually not much outside the MCUXpresso Config Tools User Guide: only few SDK examples uses the Peripherals tool (they can be found by looking for _peripheral suffix in their name), although they all use Pins and Clocks tool.

Regards,

Lukas

元の投稿で解決策を見る

3 返答(返信)
1,430件の閲覧回数
Lukas_Heczko
NXP Employee
NXP Employee

Hello,

1. Regarding external declaration of addresses:

- In case you use DMA component in Peripherals tool, you can use the external definition settings:

Lukas_Heczko_0-1678885496470.png

- Alternatively, you can use general custom initialization component:

Lukas_Heczko_1-1678885542420.pngLukas_Heczko_2-1678885547659.png

2. Regarding SHIFTBUF register address:

- There is a dedicated FLEXIO_GetShifterBufferAddress() function in the FlexIO SDK driver (file fsl_flexio.c)

- For general purposes, you may use the register mapping in MIMXRT1062.h file to obtain the register address, e.g.: &(((DMA_Type *)DMA0_BASE)->CR)

3. Regarding Config Tools examples:

- You may try the MCUXpresso Config Tools Knowledge Base: https://community.nxp.com/t5/MCUXpresso-Config-Tools/tkb-p/mcuxpresso-config@tkb Otherwise, there is actually not much outside the MCUXpresso Config Tools User Guide: only few SDK examples uses the Peripherals tool (they can be found by looking for _peripheral suffix in their name), although they all use Pins and Clocks tool.

Regards,

Lukas

1,422件の閲覧回数
CktDesigner
Contributor IV

Thanks!

Very helpful!

Can I suggest that more examples/demos that use the Periph Config Tool be included (or more detailed documentation on the interaction between DMA and Peripherals be made available (in my case using DMA with FlexIO)!

Thanks again

0 件の賞賛
返信
1,451件の閲覧回数
ErichStyger
Specialist I

Hi @CktDesigner ,

not sure what you exactly need. But you can use the -include compiler option to include a header file in front of every compilation unit (file), so you can have there anything you like.

See https://mcuoneclipse.com/2019/02/23/different-ways-of-software-configuration/

Erich

0 件の賞賛
返信