cancel
Showing results for 
Search instead for 
Did you mean: 

Touchgfx base classes on external flash memory

Andrii_K
Associate

Hello everybody.

How can I change the behavior of the base class generator in touchgfx designer?
I need to place part of the classes in an external memory chip. To do this, I modify the base class as follows:

For example:

Original generator code

 

class Navigator : public NavigatorBase

{

public:

Navigator();

virtual ~Navigator() {}

...

 

I want to place this class in an external flash memory by adding the code:

 

 

#ifndef SIMULATOR

#define QUADSPI_EXT_FLASH_MEMORY __attribute__((section("ExtConstDataSection"))) __attribute__((aligned(1)))

#else //SIMULATOR

#define QUADSPI_EXT_FLASH_MEMORY

#endif //SIMULATOR

class Navigator : public NavigatorBase

{

public:

QUADSPI_EXT_FLASH_MEMORY

Navigator();

virtual ~Navigator() {}

...

It works, but when generating the code in the Touchgfx designer, all my extra code is removed.

How can I generate code in the Touchgfx designer and not clear my extra code?

 

0 REPLIES 0