Hello EveryOne,
I am working with STM32 MCU and need to generate the binary(.bin) file from the KEIL-IDE(Development tool chain) So that I can upload the new firmware file to the HTTP/FTP server to do the Firmware over the air(FOTA).
So, Please suggest/guide me that how to generate the binary(.bin) file from the KEIL-IDE.
Thanks
Keil includes a tool to do it called fromelf, which is in the keil/ARM/ARMCC/bin directory
use fromelf.exe --bin AXF_FILE_NAME --output BINARYFILENAME
You can add it in a post build step if you want to automate it.
Related
I'm trying to deploy TF Lite on a microcontroller that is not in the examples provided by TF repository, and I'm starting with an STM32L0.
My question is:
1) how can I modify the mbed project for an STMF4 to fit another STM32 family?
I noticed I need to change the TARGET (which I could find in the mbed-os repository) but it returns me a few errors saying it misses AUDIO_DISCO and BSP modules.
2) Where do I find these libraries for my board?
Specs:
Linux Ubuntu 18.04
mbed cli 1.10.2
mbed os >= 5 (contains mbed-os.lib file)
tensorflow v2.10.1
Discovery Kit for STM32L07CZY6TR (B-L072-LRWAN1)
For part #1, you can remove the AUDIO_DISCO and BSP .lib files that are in the generated projects for Mbed.
This should get you something that builds examples that don't need to access the microphone or accelerometers, but if you want to use sensor data, you'll have to figure out what the equivalents are for your board since Mbed OS doesn't offer abstractions for these kinds of devices.
I managed to build for other targets by doing the following:
Find the target name for your board in mbed-os/targets/
In my case it was DISCO_L072CZ_LRWAN1
Clone the v2.1.0 of tensorflow repository (the latest version on master didn't work for me)
Replace by your target name in the following command:
make -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=mbed TAGS="CMSIS <lowercase_target>" generate_hello_world_mbed_project
Follow the next steps described in the tutorial and run the following command with your target name uppercase:
mbed compile -m <TARGET_UPPERCASE> -t GCC_ARM
Done! If you need to use the libraries, they will be located in
tensorflow/lite/experimental/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/features/
Hope it helps! =)
I have just installed the Sigasi Studio pluginin Eclipse (version: Eclipse IDE 2018-12). When I try to launch it,to make a new VHDL file, I get the following:
The selected wizard could not be started. org/eclipse/lsp4j/Range
(occurred in com.sigasi.hdt.vhdl.ui.VhdlExecutableExtensionFactory)
org/eclipse/lsp4j/Range
How I could solve it, please?
Thank you in advance.
Thanks to the Sigasi support, I was able to solve the problem. They wrote me:
The lsp4j plugin version is to recent for the xtext version that ships
with Sigasi Studio 4.2. This issue has been resolved in the preview
channel of release 4.3. Therefore - if you wish to use the plugin
version of Sigasi Studio - I recommend to install the 4.3 preview
following the steps explained on
http://insights.sigasi.com/tech/preview.html.
That's all. Now, I would like to configure Sigasi with GHDL (as a compiler, when I run the project) and GTKWAVE (ad a waves viewer). How can I do that?
Thanks in advance.
SIGASI + GHDL + GTKWAVE (all in one)
It is very powerful combo that you can set up. ATTENTION i use macOS 10.13.6:
Step 1
Make sure you have both installed GHDL and GTKWAVE typing
$ which gtkwave
/usr/local/bin/gtkwave
$ which ghdl
/usr/local/bin/ghdl
Step 2
Open Sigasi an make new Project and create an additional compile.sh file with:
#!/bin/sh
PROJECT_NAME="PWM_Generator"
PROJECT_NAME_TB="PWM_Generator_tb"
WORKING_DIR="/Users/imeksbank/Dropbox/UMHDL"
/usr/local/bin/ghdl -a --workdir=$WORKING_DIR/work.ghdl $WORKING_DIR/$PROJECT_NAME/$PROJECT_NAME.vhd;
/usr/local/bin/ghdl -a --workdir=$WORKING_DIR/work.ghdl $WORKING_DIR/$PROJECT_NAME/$PROJECT_NAME_TB.vhd;
/usr/local/bin/ghdl -e --workdir=$WORKING_DIR/work.ghdl $PROJECT_NAME_TB;
/usr/local/bin/ghdl -r --workdir=$WORKING_DIR/work.ghdl $PROJECT_NAME_TB --vcd=$WORKING_DIR/$PROJECT_NAME/simulation.vcd;
now, be aware, for each project you create your own variables like
PROJECT_NAME
PROJECT_NAME_TB
WORKING_DIR
I use always Dropbox for such approach because then i can access via Windows as well.
And of course, there is a possibility to create custom variables in Sigasi -> External Tool Configurator -> Program -> compile_sh -> environment to pass them to make compile.sh independent. Here you have to deal with it by yourself =)
Step 3 .
Set up you External Tools Configurations to let shell script be executed by Sigasi Studio and create the .vcd file for gtkwave:
Click on currently created Project (in my case it is the PWM_Generator).
After that click on Run -> External Tools -> External Tools Configurations ....
Then go to the left sidebar and under Program create your own anchor like compile_sh.
Finally you have your route :
Program
--compile_sh
And now extend this anchor by a custom created shell script :
Main->Location gets ${workspace_loc:/PWM_Generator/compile.sh}
Main->Working Directory gets ${workspace_loc:/PWM_Generator}
Click Apply and Run and that's it !!! After this you can program VHDL / Verilog and compile via Run -> External Tools -> compile_sh having created .vcd. In your project appears the gtkwave file and there just double click and it starts. =)
I have just downloaded GNU Radio's installer for the windows environment and am having trouble with simple audio playback from a wav file.
The audio file will play but is 'choppy' and seems to be playing back at the wrong sample rate (difficult to tell for sure due to the intermittent audio). I am using the correct sample rate from the file (11.025kHz). I have also tried adding a throttle block between the file and the audio sink, although I know that is not recommended. I'm not sure if there are 'issues' with the port to Windows or if there is some additional hardware config needed (above what is typically done in Linux) Attached is a screen grab of the GNUradio flowgraph.
note: the same 'choppy' audio is heard when the wav file source block is replaced by a signal source block.
Image showing the internal data samples related to the second comment below:
How do I backup my NodeMCU firmware before upgrading?
Note: I am a completely newbie at this. I have never worked with a NodeMCU before. I have other programming skills, so programming is not new to me.
esptool.py has a (undocumented) read_flash option which you can use to read the firmware from 0x0000 back to a local file.
$ esptool.py read_flash
usage: esptool read_flash [-h] [--no-progress] address size filename
esptool read_flash: error: too few arguments
I have already cloned the VM and installed all dependencies for my platform. Now I am a bit confused because a couple of guides suggests that Pharo image should be started to generate the C sources translated from Slang.
"Unix"
PharoVMBuilder buildUnix32.
"OSX"
PharoVMBuilder buildMacOSX32.
"Windows"
PharoVMBuilder buildWin32.
But how you generate a VM when you cannot start a VM in your platform? This sounds like chicken and egg problem.
This means is not possible to build a VM if you cannot start an image in that platform?
If you download pre-generated sources from the CI server as suggested by Esteban, you don't need the pharo-vm sources cloned from any repository. Just uncompress in a new folder and build from there.
Assuming you have your new sources in c:\phs, open directories.cmake and rename the hardcoded path as follows:
set(topDir "c:/phs/")
set(buildDir "c:/phs/build")
set(thirdpartyDir "${buildDir}/thirdparty")
set(platformsDir "c:/phs/platforms")
set(srcDir "c:/phs/src")
set(srcPluginsDir "${srcDir}/plugins")
set(srcVMDir "${srcDir}/vm")
set(platformName "win32")
set(targetPlatform ${platformsDir}/${platformName})
set(crossDir "${platformsDir}/Cross")
set(platformVMDir "${targetPlatform}/vm")
set(outputDir "c:/phs/results")
As you could not start a VM, I suppose you need to change at least the compilation flags used to generate the sources in the CI server. They are in c:\phs\build\CMakeLists.txt specially the following flags:
-march=... (your processor architecture, search for Safe Cflags)
Removing -g0 which suppress debug options
Remove -O2 (optimizations)
Remove -DNDEBUG
Modify -DDEBUGVM=0 to -DDEBUGVM=1
and finally start the build script
cd /c/phs/build
bash build.sh
You need to pre-generate the sources outside or take pre-generated sources from other place.
Let's assume you want to compile a kind of unix, you can download pre-generated sources from here:
https://ci.inria.fr/pharo/view/3.0-VM/job/PharoSVM/Architecture=32,Slave=vm-builder-linux/lastSuccessfulBuild/artifact/sources.tar.gz (for a stack vm)
https://ci.inria.fr/pharo/view/3.0-VM/job/PharoVM/Architecture=32,Slave=vm-builder-linux/lastSuccessfulBuild/artifact/sources.tar.gz (for a cog vm)