twrmcf51cn128 empty MQX project spend too much flash memory

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

twrmcf51cn128 empty MQX project spend too much flash memory

Jump to solution
568 Views
javax
Contributor I

Good day everybody.

I´ve already tested many of the features of MQX and the BSP for  twrMCF51CN128 system. I have got onto this for one month with CodeWarrior 6.3. It has been a good experience.

During this time I have noticed each time I started up a project with MQX and twrMCF51CN128  BSP just sending "Hello World" through serial port ...flash  image get   kind off 30Kb weight...too much for nothing I thing, to make matters even wors MCF51CN128´s got just 128Kb...before starting my powerful application with MQX, I´ve already spent 23% of onchip

flash memory.

 

Any suggestion about how to reduce this initial flash budget will be greatly wellcome.

 

Thanks.

0 Kudos
Reply
1 Solution
469 Views
PetrL
NXP Employee
NXP Employee

Hi,

 

the reason for big footprint for Hello Word application is that there are several IO drivers are enabled(installed) in MQX BSP by default.

 

You can simply switch them off in user_config.h (e.g)

 

#define BSPCFG_ENABLE_GPIODEV    1 -> change to 0 
#define BSPCFG_ENABLE_ADC        1   /* NOTE: Shares wires with I2C1, SPI0 */

 

If you need optimize even more , you have to create your own size optimized drivers (or modify current ones). THe MQX drivers are designed as an generic abstraction for the peripherals modules, portable across various processors making available as much features as possible. There is always trade of between code size and features + portability.

 

PetrL

View solution in original post

0 Kudos
Reply
1 Reply
470 Views
PetrL
NXP Employee
NXP Employee

Hi,

 

the reason for big footprint for Hello Word application is that there are several IO drivers are enabled(installed) in MQX BSP by default.

 

You can simply switch them off in user_config.h (e.g)

 

#define BSPCFG_ENABLE_GPIODEV    1 -> change to 0 
#define BSPCFG_ENABLE_ADC        1   /* NOTE: Shares wires with I2C1, SPI0 */

 

If you need optimize even more , you have to create your own size optimized drivers (or modify current ones). THe MQX drivers are designed as an generic abstraction for the peripherals modules, portable across various processors making available as much features as possible. There is always trade of between code size and features + portability.

 

PetrL

0 Kudos
Reply