Other Parts Discussed in Thread: Z-STACK, , CC2530, CC2531
Hello everyone,
I need to assign a proprietary IEEE Address to the device, and following the documentation Z-Stack Generic Application User's Guide (SWRU394) section 5.4, the best way to do it is by means of the Secondary IEEE Address, which is located at flash address CC2538 (512K) -- 0x27FFCC-0x27FFD3 as stated in the documentation.
The key point is that I need to set the IEEE Address during run-time at the very beginning of the code, because it comes from an external MCU. Thus, I have been looking on how to change the secondary IEEE address value in the code, and haven't found anything, so I assumed the only way to do it is by writing directly to the Flash memory. If you know another way, please tell me.
The problem arises when I try to use the HAL driver for writing in the flash:
I am using the GenericApp project as base, and it includes the hal_flash.h in the project files, with functions prototype for void HalFlashWrite(uint16 addr, uint8 *buf, uint16 cnt); and void HalFlashRead(uint8 pg, uint16 offset, uint8 *buf, uint16 cnt); but when I try to use the HalFlashWrite() function in ZMain.c, the following error is raised during compliation in the linking stage:
Linking Error[Li005]: no definition for "HalFlashWrite" [referenced from C:\Texas Instruments\Z-Stack Mesh 1.0.0\Projects\zstack\Samples\GenericApp_test\CC2538\Router - OTA ImageA + Bootloader\Obj\ ZMain.o] Error while running Linker
Then, I have found out that there is no hal_flash.c file included in the project, and that there is no such file in the Components\hal\target\CC2538 folder. I can only find the hal_flash.c file for CC2530 target...
Which is the assumed procedure to follow for reading/writing to Flash in CC2538? Is it possible to copy the hal_flash.c file from CC2530 to CC2538 target and include it to the project?
Do you have any other proposals for changing the IEEE Address value in the code?
Thank you in advance,
Gaspar
PS:Using CC2538, with Z-Stack Mesh v1.0.0 due to compatibility reasons, but I have been looking for hal_flash.c in other Z-Stack releases like HA and 3.0.1