-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot flash turpial-firmware onto Launchpad #187
Comments
Hello @kkdao, thanks for opening the issue. You need to install the toolchain for Xtensa (the architecture used by the ESP32). Here's a detailed guide from RIOT ESP32 -Toolchain. I'd recommend to follow the manual installation if you aren't comfortable using Docker, I, myself manually installed it, the steps are:
mkdir -p $HOME/esp
cd $HOME/esp
git clone https://github.com/gschorcht/xtensa-esp32-elf.git
export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin Please close the shell/terminal and restart it, or
cd $HOME/esp git clone https://github.com/espressif/esp-idf.git cd esp-idf git checkout f198339ec09e90666150672884535802304d23ec git submodule init git submodule update Then, as we did with the
Save, restart your shell or You should be able then to build the firmware with To install pyserial after you have python3
To flash it, You may need to change the |
Thanks for the steps on installing Xtensa @jeandudey , however I am still having troubles, so let me explain again better. I was able to build and flash the radio-firmware onto the cc1312-launchpad okay with the ARM-GCC toolchain in my $HOME folder. I did 'make' in the radio-firmware folder FYI. Since I was told the turpial-firmware should be on both boards I want to flash the turpial-firmware onto the launchpad as well. I said I was able to clone and compile it okay, but in fact I was not able to compile it okay. In that compiling section for step 3 (https://github.com/btcven/turpial-firmware#compiling), I was not able to build the mesh firmware (for the CC1312). Does this mean after entering the turpial-firmware folder that I should install the ARM-GCC inside it like I did with the radio-firmware here: https://github.com/btcven/radio-firmware#on-ubuntuany-linux-distribution ? FYI the reason I got the error message about xtensa-esp32 I initially did here: #187 (comment) is because in the compiling section I missed step 3 for some reason and went straight to flashing with this command: |
You need to do the same steps, but for the ARM compiler, see this guide.
|
I don't want to follow a link to a general download guide and have to figure out exactly which commands to use to make it specific to this project, so I used these steps like I asked in the previous comment, and it worked okay: https://github.com/btcven/radio-firmware#on-ubuntuany-linux-distribution The only difference between the ARM compiler I installed and the one you linked me a guide to, is that yours is the most recent version and mine is still from 2019, so hopefully that is okay! Maybe you guys need something with the latest version, so please let me know if that's the case, thank you. I was then able to successfully build the mesh firmware for the CC1312 using this command: 'make -C mesh BOARD=cc1312-launchpad' However, I am not exactly sure how to flash the firmware onto the launchpad. I tried installing Uniflash, but still after using this command 'make -C mesh flash PROGRAMMER=uniflash' i get a Traceback call Should I try this way instead to flash the firmware onto the CC1312 using the serial port only, and not through JTAG? https://github.com/btcven/ti-bootloader I am not sure what the difference is between serial port only and JTAG though.. Lastly, for the CC1312-launchpad device should I be building and flashing the mesh firmware only or should I also be building and flashing the wifi firmware as well onto the launchpad as well ? Thanks for your help so far |
Could you post the traceback? And how you installed uniflash? |
the same way i installed Uniflash to flash the radio-firmware okay: FYI that is an Arch Linux download source because my OS in Manjaro |
Delete |
Thanks, that helped some. It started building, but then got a uniflash related error when trying to flash. See here: https://pastebin.com/i0YRbPe0 |
|
Hmm, I tried 'export UNIFLASH_PATH=$HOME/turpial-firmware/uniflash_sl.6.1.0.2829.run' but got the same error message:( FYI when I flashed the radio-firmware before "uniflash_sl.6.1.0.2829.run" was in my $HOME folder along with "gcc-arm...", but I used 'make' in the radio-firmware folder to flash it successfully. I used this command to export: 'export PATH=$PATH:$HOME/gcc-arm-none-eabi-9-2019-q4-major/bin/' and I used 'printenv' to check if the variable was added correctly and it was. The variable started with "PATH=$HOME.local/bin:...." and it had "$HOME/gcc-arm-none-eabi-9-2019-q4-major/bin/ at the end of it". There was some text in between but not too much. This time after trying what you suggested, I used 'printenv' like I did before when I was flashing the radio-firmware to check if the change was made and I do see this there FYI: Also, this time after using 'printenv' there was A LOT of text (about $HOME/esp/esp-idf/components, $HOME/.espressif/tools/xtensa, etc...) in between the PATH variable I made when flashing the radio-firmware which there wasn't nearly as much of before. Just trying to be as helpful as possible with my feedback, hopefully it helps.. Maybe the new text is from step 3. when I was following this: #187 (comment) I feel like since I was getting help from Luis, and now you, there are maybe some conflicts with the info I've been given. Do you suggest removing all folders and starting again? If so, please be clear on where I should start from the beginning. Thank you |
Hi @kkdao , you need to first install Uniflash (the .run file you downloaded). Then you need to export the UNIFLASH_PATH variable, to where uniflash was installed, usually it's installed on Run the uniflash installer you just downloaded with, and follow the UI steps to install it:
|
Okay thank you for this. So if I was able to get the Uniflash GUI running and it detected the Launchpad device, is that the goal? I just need an image for it to flash though.. Or should I be trying to flash via command line with the steps you've already provided and that will flash the image for me? |
Reason why I ask is because I'm still having trouble via the CLI. After running this command: './uniflash_sl.6.1.0.2829.run' i get this error at the end of following the UI steps to install Uniflash: unable to run post-installation script (/opt/ti/-uniflash_6.1.0/postinstall.sh) with gksu to configure USB So I went to where that postinstall script for Uniflash is ($HOME/turpial-firmware/uniflash_6.1.0) and ran the command 'sudo ./postinstall.sh' and this is the error I got back: I tried rebooting as suggested but that didn't help. I also tried this, but that didn't help: https://unix.stackexchange.com/questions/39370/how-to-reload-udev-rules-without-reboot |
Very weird indeed, this might be a compatibility problem on the half of Uniflash which doesn't provide support for non Debian based OSes (hence the error about Maybe using OpenOCD might be easier for you since it's open source, and supports Arch as far I know, I myself have been using OpenOCD too to program the devices and Uniflash when a problem happens. Although, in this case it might be better to use it, flash a dummy binary to make available the ROM bootloader so you can use our Installing OpenOCDYou may need to install
In any folder, run these commands individually:
Flashing the firmware onto the Launchpad with OpenOCD
|
Okay I thought I might need to try OpenOCD. I installed 'base-devel' no problem. For the next steps, I was okay until 'sudo make install' where I got a warning about 'aclocal-1.15' is missing. I searched online and found that before running ./configure I should try 'autoreconf -f -i'. I did and that helped get rid of that warning. So after running './configure --enable-xds110 --disable-werror' again and then 'sudo make install' it made a lot more progress and it seemed like it was running okay, but then I got an error: .... I went online again and figured running this command would help 'sudo pacman -Syu libftdi' but after trying 'sudo make install' again I get the same "fatal error" FYI. EDIT: I think I need " libftdi-dev" as well, but I'm having a hard time finding it for my OS currently. |
Have you tried installing |
I was just about the edit the post because I found that might help haha. This has the "ftdi.h" file I need as I found here: https://archlinux.org/packages/community/x86_64/libftdi-compat/files/ So all good now, 'sudo make install' worked this time. Went back to turpial-firmware folder and ran 'export PATH=$PATH:$HOME/turpial-firmware/gcc-arm-none-eabi-9-2019-q4-major/bin/' Then I ran 'make -C mesh flash BOARD=cc1312-launchpad PROGRAMMER=openocd' and it looked like it flashed okay:) |
Yay! thanks @kkdao , thanks for your interest on this, I'll try to make a dedicated guide for the compilation process from the ground-up taking notes from this thread 🚀 |
You may try to |
When I try 'make term BOARD=cc1312-launchpad' I get this: make: *** No rule to make target 'term'. Stop. |
Oops: |
This works mostly, here is the output: make: Entering directory '$HOME/turpial-firmware/mesh' I say mostly because I was not able to use RIOT following this guide: https://github.com/RIOT-OS/Tutorials/tree/master/task-01 So I tried installing "twisted" https://archlinux.org/packages/extra/x86_64/python-twisted/ but still get the same output and am having trouble using "pyterm" |
You're connected to it, you can press the reset button (right side of the USB in the board) while having the terminal open, or directly type |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you think this is an important issue, notify it directly by email to: [email protected] |
Trying to put together a DIY setup, and I was told by Luis that he thinks the Turpial repo must compile the firmware for my two boards (launchpad+ESP32) and to try it out.
I was able to clone and compile okay, but when I try and flash it as stated here:
https://github.com/btcven/turpial-firmware#flashing-the-firmware
I get this error message:
'Compiler xtensa-esp32-elf-gcc is required but not found in PATH. Aborting.'
Does this mean the launchpad doesn't need the turpial-firmware, and I should just move onto flashing the ESP32 board with the turpial-firmware?
I was able to build and flash the radio-firmware onto the launchpad okay FYI
The text was updated successfully, but these errors were encountered: