Erasing flash


Hi all, could anyone tell me if it is possible to erase the flash memory(something similar to AT+wopen=3) into the OpenAT application?


Hi sergiofernando,

you can use the “wm_osDeleteFlashData(u16 ID)” if you want to erase a single memory ID or you can use “wm_osDeleteAllFlashData(void)” to erase the whole flash memory.



Hi skos, thanks for the help; i´m getting the following error when compiling with this funtion:

/cygdrive/C/OpenAT/Tools/GCC/bin/arm-elf-nm: gcc_Rastel_32.elf: No such file or directory
make: *** [make_single_bin] Error 1

the header file wm_os.h is included in my project and is in the out directory, any ideas?




Hi sergiofernando,

Do you write your program with OpenAt- or ADL libraries?
The wm_os… functions are OpenAt functions and this could be the problem.

If you need these functions for ADL you should take adl_flhErase(ID).
I know this function is only to erase for one ID.
But in this case you have the following possibility:

for (cnt=0; cnt < cntmax;cnt++)
     if (adl_flhExist( cnt ))
         // ID is ok -> erase ID
         adl_flhErase( cnt );

To my knowledge an equal function from “wm_osDeleteAllFlashData(void)” for ADL is not yet available.
(Perhalps this function will come in the following Library updates?) :cry:

This function “wm_osDeleteAllFlashData(void)” is only for OpenAt programs and not for ADL programms. :cry:

I hope I could help you a little bit.
Good look



hi skos, I´m using ADL, so i´ll have to use flhErase() function.
thank you very much for the help,


Hello (first post :smiley:)

From the ADL User Guide OAT3.02 v6: in adl_flhErase function description:
“Important note: if ID is set to ADL_FLH_ALL_IDS, all flash objects related to the provided handle will be erased”


Hi fgriset,

Thanks for this information.
It is really easier as my suggestion.