make clean all PLATFORM=photon APP=photon program-dfu
I get the following error
C:\Users\LONDON~1\AppData\Local\Temp\ccBy2XKj.ltrans0.ltrans.o: In function `setConfigureSSID':
C:\spark\firmware\modules\photon\user-part/applications/photon/myapp.cpp:27: undefined reference to `dct_read_app_data'
C:\spark\firmware\modules\photon\user-part/applications/photon/myapp.cpp:31: undefined reference to `dct_write_app_data'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [../../../build/target/user-part/platform-6-m-lto/applications/photon/photon.elf] Error 1
make: *** [modules/photon/user-part] Error 2
Both dct_read_app_data and dct_write_app_data are defined in dct.h but adding that header is not adequate to be able to use these functions. What am I doing wrong?
@kennethlimcp is correct. The only way you will be able to modify the SSID is via local compile of the firmware. The web IDE just dosen’t give you access to those libraries otherwise.
Yes I have been doing a local compile, but it seems I need to do more then just #include dct.h in order to be able to call those functions dct_read_app_data & dct_write_app_data. I experimented with modify the softap.cpp code directly. That worked fine but I am very interested in being able to accomplish the task within the user code segment rather than the system code segment. When I try to duplicate these few instructions in my user code I fine I cannot call them. Any ideas?
@HardWater, with the Photon’s system/user firmware separation, functions in the system “partition” that are accessible to the user need to be exposed via a HAL/wiring API so the dynamic links are not compromised. I suggest you post an issue on the repo outlining the requirement. It makes sense to have a user-configurable SSID for the softAP.
I did a search for the source for dct_read_app_data & dct_write_app_data but cannot find it in the repo only that it is defined as an extern function. I was thinking that maybe there are lower level commands that I need to execute to access the hardware and those commands were accessable.
@HardWater, what @mdma says is true however, when you need to hook into a shared resource (eg. ISR vector table), you will need an API. Also, anything that is done in the WICED library will need to be exposed as the library remains closed to users for now. Those functions are (likely) in the WICED (pre-compiled) image explaining why you can’t find them.