Howto free const array from mem after use

If you have a simple question and just want an answer.
mmar
XCore Addict
Posts: 134
Joined: Fri Jul 05, 2013 5:55 pm

Howto free const array from mem after use

Post by mmar »

Hello all,

i need inbuild one flash image bin file into xmos build and in application load it over i2c to other MCU btw. ARM.

I can create variable const unsigned char flashimage[] = {............} around 20kB

But howto free mem used with this after do job. This mem is needed for next buffer code...

(flash code is no problem)

srinie
XCore Addict
Posts: 158
Joined: Thu Mar 20, 2014 8:04 am

Post by srinie »

Hi,

I assume the whole need is that, accesing flash from other mcu is to be bypassed, and xmos mmcu takes this role of sending the flash data.

In such a case, can you try creating flash data partitions to store this 'other' bin file (instead of including it in the mcu bin image), read it from the xmos mcu program and send it to the target MCU "on-the-fly"?

 

Some reference for flashlib api:

https://www.xmos.com/download/private/x ... e%28X3766D%... [section 27 and 28]