# Erasing flash

**URL:** <https://forum.sierrawireless.com/t/erasing-flash/219>\
**Category:** Open AT\
**Created:** [January 12, 2006, 5:55pm UTC](https://forum.sierrawireless.com/t/erasing-flash/219 "2006-01-12T17:55:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergiofernando](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sergiofernando](https://forum.sierrawireless.com/u/sergiofernando)\
**Post date:** [January 12, 2006, 5:55pm UTC](https://forum.sierrawireless.com/t/erasing-flash/219/1 "2006-01-12T17:55:33Z")

</div>

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?  
thanks,  
SÃ©rgio

---

<div class="post-metadata">

**Author:** ![skos](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@skos](https://forum.sierrawireless.com/u/skos)\
**Post date:** [January 16, 2006, 12:14pm UTC](https://forum.sierrawireless.com/t/erasing-flash/219/2 "2006-01-16T12:14:20Z")

</div>

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.

Regards  
skos

---

<div class="post-metadata">

**Author:** ![sergiofernando](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sergiofernando](https://forum.sierrawireless.com/u/sergiofernando)\
**Post date:** [January 19, 2006, 4:19pm UTC](https://forum.sierrawireless.com/t/erasing-flash/219/3 "2006-01-19T16:19:54Z")

</div>

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?

regards,

SÃ©rgio

---

<div class="post-metadata">

**Author:** ![skos](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@skos](https://forum.sierrawireless.com/u/skos)\
**Post date:** [January 20, 2006, 6:21am UTC](https://forum.sierrawireless.com/t/erasing-flash/219/4 "2006-01-20T06:21:04Z")

</div>

Hi sergiofernando,

> [@](#):
>
> 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?

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:

```auto
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?) 😢

This function “wm\_osDeleteAllFlashData(void)” is only for OpenAt programs and not for ADL programms. 😢

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

skos

---

<div class="post-metadata">

**Author:** ![sergiofernando](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sergiofernando](https://forum.sierrawireless.com/u/sergiofernando)\
**Post date:** [January 20, 2006, 3:00pm UTC](https://forum.sierrawireless.com/t/erasing-flash/219/5 "2006-01-20T15:00:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fgriset](https://avatars.discourse-cdn.com/v4/letter/f/ac8455/32.png) [@fgriset](https://forum.sierrawireless.com/u/fgriset)\
**Post date:** [January 27, 2006, 3:09pm UTC](https://forum.sierrawireless.com/t/erasing-flash/219/6 "2006-01-27T15:09:52Z")

</div>

Hello (first post 😃)

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”

---

<div class="post-metadata">

**Author:** ![skos](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@skos](https://forum.sierrawireless.com/u/skos)\
**Post date:** [January 30, 2006, 8:16am UTC](https://forum.sierrawireless.com/t/erasing-flash/219/7 "2006-01-30T08:16:24Z")

</div>

> [@fgriset](#):
>
> “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.

regards,  
skos
