Comments (24)
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:)
from turpial-firmware.
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 🚀
from turpial-firmware.
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:
- Create
esp
directory at your$HOME
folder:
mkdir -p $HOME/esp
cd $HOME/esp
- Clone the toolchain repository, for Linux:
git clone https://github.com/gschorcht/xtensa-esp32-elf.git
- Add the toolchain to your
$PATH
environment variable, for Bash this can be done by adding this line at the end of your$HOME/.bashrc
file:
export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
Please close the shell/terminal and restart it, or source $HOME/.bashrc
to reflect the changes.
- Install the ESP-IDF SDK, this, but for RIOT, it uses an special version:
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 $PATH
variable, add this line to the end of your $HOME/.bashrc
:
export ESP32_SDK_DIR=$HOME/esp/esp-idf
Save, restart your shell or source $HOME/.bashrc
to reflect the changes.
You should be able then to build the firmware with make -C wifi BOARD=esp32-wroom-32
, to flash it, first install pyserial
, you may need Python 3 for this, most Linux based operating systems already include it, or install it from the repository.
To install pyserial after you have python3
sudo pip3 install pyserial
To flash it, make -C wifi BOARD=esp32-wroom-32 PORT=/dev/ttyUSB0
You may need to change the PORT
to your ESP32 port.
from turpial-firmware.
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).
After running 'sudo make -C mesh BOARD=cc1312-launchpad' I get an error stating: Compiler arm-none-eabi-gcc is required but not found in PATH. Aborting.
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:
make -C wifi flash PORT=/dev/ttyUSB0
from turpial-firmware.
You need to do the same steps, but for the ARM compiler, see this guide.
Since I was told the turpial-firmware should be on both boards I want to flash the turpial-firmware onto the launchpad as well.
make -C mesh flash
from turpial-firmware.
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
from turpial-firmware.
Could you post the traceback?
And how you installed uniflash?
from turpial-firmware.
the same way i installed Uniflash to flash the radio-firmware okay:
'sudo wget http://software-dl.ti.com/ccs/esd/uniflash/uniflash_sl.6.1.0.2829.run'
FYI that is an Arch Linux download source because my OS in Manjaro
from turpial-firmware.
Delete mesh/Kconfig
and wifi/Kconfig
and try building again.
from turpial-firmware.
Thanks, that helped some. It started building, but then got a uniflash related error when trying to flash.
See here: https://pastebin.com/i0YRbPe0
from turpial-firmware.
export UNIFLASH_PATH=<path to uniflash>
to your .bashrc
from turpial-firmware.
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:
UNIFLASH_PATH=$HOME/turpial-firmware/uniflash_sl.6.1.0.2829.run
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
from turpial-firmware.
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 $HOME/ti/uniflash_<version>
.
Run the uniflash installer you just downloaded with, and follow the UI steps to install it:
chmod +x uniflash_sl.6.1.0.2829.run
./uniflash_sl.6.1.0.2829.run
from turpial-firmware.
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?
from turpial-firmware.
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
driver permissions. To configure the permissions please run the script manually as root.
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:
https://pastebin.com/S7jG12KN
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
from turpial-firmware.
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:
https://pastebin.com/S7jG12KN
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 service
command, which isn't present on Arch/Manjaro Linux).
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 ti-bootloader
tool in the future when OpenOCD stops working (very common). But let's get it first working.
Installing OpenOCD
You may need to install base-devel
on Manjaro/Arch (similar package exists in Debian based systems, build-essentials
).
# Base devel group, which includes various development tools
pacman -Syu base-devel
In any folder, run these commands individually:
# Clone into the openocd-ti folder
git clone https://git.ti.com/cgit/sdo-emu/openocd openocd-ti
# Change directory to the openocd source code
cd openocd-ti/openocd
# Configure, build, install with support for XDS110
./configure --enable-xds110 --disable-werror
make
sudo make install
Flashing the firmware onto the Launchpad with OpenOCD
make -C mesh flash BOARD=cc1312-launchpad PROGRAMMER=openocd
from turpial-firmware.
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:
....
src/jtag/drivers/presto.c:37:10: fatal error: ftdi.h: No such file or directory
37 | #include <ftdi.h>
compilation terminated.
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.
from turpial-firmware.
Have you tried installing libftdi-compat
to see if it solves the problem? I haven't seen a libftdi-devel
(as on Arch based distros do, for development headers), so that might do the trick
from turpial-firmware.
You may try to make term BOARD=<>
to access the device's shell 👀
from turpial-firmware.
When I try 'make term BOARD=cc1312-launchpad' I get this:
make: *** No rule to make target 'term'. Stop.
from turpial-firmware.
Oops: make -C mesh term BOARD=cc1312-launchpad
, sorry my fault
from turpial-firmware.
This works mostly, here is the output:
make: Entering directory '$HOME/turpial-firmware/mesh'
$HOME/turpial-firmware/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"
Twisted is not available, please install it if you want to use pyterm's JSON capabilities
# Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
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"
from turpial-firmware.
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 help
on it and press enter.
from turpial-firmware.
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]
from turpial-firmware.
Related Issues (20)
- Fix warnings in the code. HOT 1
- Broken hyperlink on turpial-firmware github page HOT 3
- Disable C++ exceptions HOT 1
- Remove warnings from code. HOT 1
- Errors in Travis-CI configuration HOT 3
- Generate self signed certificates on demand. HOT 1
- Missing "HTTP" Unit testing HOT 1
- Use SLIP for radio communication HOT 1
- [Tracking] Verify that we comply with the coding style. HOT 3
- Implement HTTP Authentication HOT 3
- Update license heading for all source files. HOT 2
- compilation issue HOT 2
- Compilation error HOT 2
- Implement ESC functionality
- sdkconfig gets overwritten everytime idf.py is used
- Use a Kconfig based style configuration menu (menuconfig). HOT 5
- Implement Turpial button functions. HOT 3
- Radio communication. HOT 4
- Don't use BLE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turpial-firmware.