Generating ELF file using cloud compiler


#1

Currently trying to work out what is using RAM in my application (which seems to be my issue with SoftAP not working).

The following article on memory management mentions an “ELF file analyser”:

Question: is it possible to generate the ELF file locally using the cloud compiler (ie CLI compile command)? Hoping that there is some hidden option…


#2

PS - I note this in the compiler output:

Memory use: text data bss dec hex filename 93836 6040 26376 126252 1ed2c /workspace/target/workspace.elf
So the question reduces to:

Is file /workspace/target/workspace.elf in the cloud and if so, can it be retrieved?


#3

Nope, the only thing that will find the way back to you after a succesful build is the binary.

However, this would be a nice feature request to add some command switch to download the project result (including .elf and sources) as a zip archive.


#4

@UMD, you can also locally compile to get access to both the MAP and ELF files. As for working RAM, the use of dynamic RAM allocation, as is done in SoftAP, may best be debugged using the hardware debugger.


#5

Particle Workbench is pretty solid. Here is how to locally compile with it:

CMD - SHIFT - P to open the Workbench command executor.
Install the local compiler toolchain corresponding to your device OS you want.
Particle: Install Local Compiler Toolchain

CMD - SHIFT - P to open the Workbench command executor.
Launch the compiler shell in terminal
Particle: Launch Compiler Shell

Compile your firmware
make -f $PARTICLE_MAKEFILE compile-user

Find your binary and .elf file somewhere in the ./target directory in your workspace directory.


#6

Thanks guys!

@ScruffR, absolutely makes sense to have a command line option with the CLI compiler…

Am using Particle Dev and not Particle Workbench so it looks like I need to migrate to get that ELF file.

Luckily am pretty sure that the SoftAP issue is simply not enough free memory - so I will work on that “the hard way”.