I’m very pleased that we have been finally able to push our latest Core and Photon firmware into our public repo after obtaining the 3rd party licenses required!
Photon: The firmware is the 0.4.0 release that is flashed to photons once they first connect to the cloud, and is the same firmware flashed via Particle Build (Web IDE.)
Core: The firmware is pre-release since we have not formally released 0.4.0 on the Core. (The WebIDE is building 0.3.4, which corresponds to the master branch.)
I hope everyone that is building locally will test their apps on this new codebase and report their findings, positive or otherwise!
Over the coming days I will be updating documentation, pulling together all the info needed about how the repo has been restructured. In the meantime feel free to ask questions here!
@mdma, I tried to compile under Windows and getting following errors:
The syntax of the command is incorrect.
The syntax of the command is incorrect.
make[1]: *** […/build/target/user/platform-0-lto/src/src/application.o] Error 1
@peekay123, yes, I am running from “main” folder. Previously I was having issue with “tr” command and after installing the GnuWin, that error is gone. My GCC version is 4.9-2015-q1-update and the make version is 3.81. I am on Win7 too.
@krvarma, I found that the path makes all the difference. Here is what I have installed on my Win 7x64 PC and the path I use:
Git version 1.95 preview20150309
GitHub 2.8.1.1
GNU Tools for ARM Embedded Processors 4.9 2015.q1
GnuWin32: Make 3.8.1
Nodejs 0.12.0 (for Particle CLI, etc)
The end of my path is:
PATH=…
C:\Program Files\nodejs;C:\Git\cmd;C:\win32-mingw32;C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q1\bin;C:\Program Files (x86)\GnuWin32\bin;C:\MinGW\msys\1.0\bin;C:\Git\bin
Cool that you can compile it. I am looking at the code but I cannot find any place where they call FreeRTOS’ xTaskCreate funciton to create a thread to deal with their internal stuff like Wifi communication. I can only find FreeRTOS’ header files but no .cpp. Do you know if they are included?
The FreeRTOS calls are handled in the WICED SDK. At present, we don’t distribute the sources for that, only the compiled libraries. You can register with Broadcom to download the SDK to gain access to the sources.
Presently all the code runs on the main thread, so there’s not much to see under the covers.
@peekay123, I managed to rectify the error “The syntax of the command is incorrect” error, it was due to the “mkdir” command. By default this will take the Windows mkdir command. This results in the “The syntax of the command is incorrect” error. When it is changed to GnuWin's mkdir then it is working correctly (by modifying the common-tools.mk file). But after that following error is coming.
D:\particle\firmware\main>make
arm-none-eabi-gcc -Tlinker_stm32f10x_md _dfu.ld -L../build/arm/linker --specs=na
no.specs -lc -lnosys -u _printf_float -Wl,-Map,../build/target/main/platform-0-l
to/main.map -L../build/target/user/platform-0-lto/src/ -L../build/target/wiring
/platform-0-lto/ -L../build/target/system/platform-0-lto/ -L../build/target/serv
ices/platform-0-lto/ -L../build/target/communication/platform-0-lto-prod-0/ -L..
/build/target/hal/platform-0-lto/ -L../build/target/platform/platform-0-lto/ -Wl
,--whole-archive -luser -lwiring -lhal -lsystem -lservices -lcommunication -lpla
tform -Wl,--no-whole-archive -L../build/arm/linker -nostartfiles -Xlinker --gc-s
ections -flto -Os -fuse-linker-plugin ../build/target/main/platform-0-lto/star
tup/startup_stm32f10x_md.o -o ../build/target/main/platform-0-lto/startup/star
tup_stm32f10x_md
arm-none-eabi-gcc: error: _dfu.ld: No such file or directory
make: *** No rule to make target `../build/target/main/platform-0-lto/startup/st
artup_stm32f10x_md', needed by `../build/target/main/platform-0-lto/main.elf'.
Stop.
Thanks @mdma!, I have the MinGW installed already and is included in the path. Also I am targeting Core, I don’t have Photon with me . But when I target the Photon just for testing, it is giving some other error:
D:\particle\firmware\main>make PLATFORM=photon
head: $((`stat: invalid number of bytes
make[1]: *** [../../../build/target/user-part/platform-6-m-lto/user-part.bin] Er
ror 1
make: *** [modules/photon/user-part] Error 2
Is there any particular order MinGW should appear?
Sure! Ubuntu is also a little tricky when i tried it during the firmware development but i managed to make it work. Let me know if it doesn’t work for you.
Been playing with installation across various platforms recently