[SOLVED] Locally Compiling for Boron/Argon

boron
xenon
Tags: #<Tag:0x00007fe21e71f7e8> #<Tag:0x00007fe21e71f6a8>

#1

Hi there,

I have been trying to compile a program locally, while the program compiles just fine using the following commands:

make clean all PLATFORM=xenon  APPDIR=<path to src>
make clean all PLATFORM=boron  APPDIR=<path to src>

I get the following error when using the command line

I tried using the force command since they are both the same controller but the LED glows purple and thats about it


#2

Are you compiling/flashing them for a specific device type? Each device type has a unique ID, which has to be respected.


#3

You can check the target of a binary via particle binary inspect bmeRauf.bin (corrected after being pointed out by @emil01).
You should also not try forcing a non-fitting binary into flash - even if you think that must work.
BTW, even if the controller is the same, the pin mapping is not.
You may want to build with PLATFORM_ID=13 or PLATFORM_ID=14 instead, maybe the platform name is just not translated correctly.

Also if you use the -v switch for more verbose output on your flash command, you might get some extra info.

From where are you executing your make command? Since the location decides which makefile will be used, the output will differ.
If you want a modular binary you should run it from the modules folder.


#4

@Moors7 Yes I am , compiled for the xenon using

make clean all PLATFORM=xenon  APPDIR=<path to src>

It seems to be compiling correctly as I can see the platform-14-m folders being created under build/target but for some reason the bin file has a PLATFORM_ID of 12. The same goes for the boron as well.

@ScruffR Thank you for the inspect tip, I checked it and it says compiled for Argon when though platform was entered as Xenon/Boron during compilation. Btw the command should be binary, not serial

particle binary inspect <binary file>

It must be a translation error somewhere as the remaining files seem to be compiling for the correct platform based on platform-14-m folders being created under build/target

I am running the make command from under modules


#5

The issue seems to have been caused by some corrupted file, cloned the repo again and it worked fine


#6

I have been testing this for a while, and I am not really sure what the issue is.

Does cygwin or make cache any of the files?

I have separate folders now for compiling for Xenon and Argon and yet if I compile say for Argon first and then go to the Xenon folder and compile again, the binary inspect will output saying for Argon. This happens vice versa as well.


#7

This is a side effect of the build environment to check whether any of the sources have changed since last build and if not the pre-compiled object files get reused. But since some of these would be built to the specifics of the other platform the wrong ones would be reused.
To work around that you should run a make clean before compiling.
That will add some extra time for the clean and the rebuild of all the objects (including the non-platform specific ones) but has to be done for now whenever switching target platform.

I’ve brought this issue up for Workbench and Partilcle is discussing whether there are ways around this and how to implement that properly.


#8

@ScruffR I have tried using make clean, I have even tried deleting the module and target folder in build to no avail.

Everytime I get stuck with this, I just clone a new repo.


#9

Too bad.
But since Particle Workbench I’ve stopped running my own local toolchain and moved over to PWB and there the make -f $PARTICLE_MAKEFILE clean-user command usually helps in my cases (in rare instances I need to run make -f $PARTICLE_MAKEFILE clean-all)


#10

Thanks will test it out.


#11

Unknown Platform message? Has anybody seen this before?


Inside the module folder i have argon, xenon and PlantSoil (APPDIR) the xenon contains the bin files 3 bin files 1) xenon-bootloader@1.1.1.bin 2) xenon-system-part1@1.1.1.bin and 3) xenon-tinker@1.1.1.bin these binary files I got from here and Argon contains its own 3 binary files and the APPDIR PlantSoil contains two dot ino file to build the app. Is there a command in gcc where I can make Argon, Xenon and App all compiled together or should I first makefile the Argon and upload using DFU mode … Please note i have already done factory reset now


#12

Try running particle update-cli and try again :wink:


#13

I did try that but it keep referring me back to npm install -g particle-cli however it has updated the particle-cli to 1.42 but no difference in error

, It think it may have to do with gcc tool that i am using it is 5.31.2 and it may need to be updated https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/6-2017-q2-update. So I did update to $ arm-none-eabi-gcc --version
arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]
Copyright © 2016 Free Software Foundation, Inc.
the interesting part is when I do make clean all PLATFORM=photon I do not get that error of Stop So its back to you ScruffR, It is working for photon NOT sure if anybody else has encounter this problem with MESH products of running locally using 1.1.1 device OS


#14

@Mapoint Which branch are you running from?

If you are unsure you can check using:

git branch

The default branch is develop and this could be reason for the issue. Try using one of the release branches like

git checkout release/v1.1.0


#15

Thanks Emil01
But I am not using git, I download the binnary zip file and then extract it on my windows computer


#16

@Mapoint Try downloading v1.10 and test again