-
• #2
Yes, RX and TX should be swapped, but you're not getting that far.
Could you try getting the code using
git clone https://github.com/espruino/Espruino
first? It looks like maybe you downloaded a zip or something and that's causing some issues.The lack of
string.h
in the error is a bit worrying though - that should be part of GCC really, so it sounds like your compiler isn't set up right. Did you follow the docs on GitHub? -
• #3
In fact I had downloaded a zip. But today I tried the
git clone https://github.com/espruino/Espruino
method. And sort of good news, I got a different error.
[user@hostname Espruino]$ sudo STM32F411DISCOVERY=1 WIZNET=1 make CC src/jslex.o In file included from /home/user/Downloads/building-espruino-411/Espruino/targetlibs/arm/core_cm4.h:143:0, from /home/user/Downloads/building-espruino-411/Espruino/targetlibs/stm32f4/lib/stm32f411xe.h:160, from /home/user/Downloads/building-espruino-411/Espruino/targetlibs/stm32f4/lib/stm32f4xx.h:173, from /home/user/Downloads/building-espruino-411/Espruino/gen/platform_config.h:13, from src/jsutils.h:17, from src/jslex.h:17, from src/jslex.c:14: /usr/lib/gcc/arm-none-eabi/6.2.0/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory # include_next <stdint.h> ^ compilation terminated. make: *** [Makefile:1884: src/jslex.o] Error 1 [user@hostname Espruino]$
I see it knew to grab my /usr/lib/gcc/arm-none-eabi this time, so i assume it's not a path problem.
-
• #4
the contents of
/usr/lib/gcc/arm-none-eabi/6.2.0/include/stdint.h
are:
ifndef _GCC_WRAP_STDINT_H if __STDC_HOSTED__ if defined __cplusplus && __cplusplus >= 201103L undef __STDC_LIMIT_MACROS define __STDC_LIMIT_MACROS undef __STDC_CONSTANT_MACROS define __STDC_CONSTANT_MACROS endif include_next <stdint.h> else include "stdint-gcc.h" endif define _GCC_WRAP_STDINT_H endif
[NOTE: in the contents above, I removed the "#" at the beginning of each line to prevent forum language from seeping through like this]
[#endif](https://forum.espruino.com/search/?q=%23endif)
, seems like it is trying to call itself, via
# include_next <stdint.h>
and failing.
-
• #5
Looks like you're maybe using the wrong compiler version. It's 6.2?
Looking at https://launchpad.net/gcc-arm-embedded (the recommended one) the lastest stable version there is 5.4. Maybe you could try using that?
-
• #6
Okay I'm back. This time, I ditched Arch for Ubuntu 14.04 temporarily (This is a gnome-boxes VM) . And I ran the following commands starting inside the home folder:
sudo apt-get install git ### install git dependency git clone https://github.com/espruino/Espruino ### download the repository into the home folder as ~/Espruino/ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa ### add the untrusted ppa as instructed by launchpad.net sudo apt-get update ### refresh repository databases sudo apt-get install apt-file sudo apt-file update ### apt-file needed to search for the proper toolchain package apt-file search arm-none ### conduct search; shows gcc-arm-none-eabi sudo apt-get install gcc-arm-none-eabi cd Espruino/ ### will receive an error here if not in home folder STM32F411DISCOVERY=1 RELEASE=1 make ### as per Espruino github instructions
I received the following error:
cc1: some warnings being treated as errors make: *** [targets/stm32/jshardware.o] Error 1 make: *** wait: No child processes. Stop.
The stack trace is very long, but I can provide it if necessary via a bash output file.
-
• #7
which version of GCC is it? try
arm-none-eabi-gcc --version
.I usually:
- go here https://launchpad.net/gcc-arm-embedded/+download
- Download the Linux tar
- Extract it to somewhere in my home directory
- Add that to the path
And then run make.
- go here https://launchpad.net/gcc-arm-embedded/+download
-
• #8
The output of:
arm-none-eabi-gcc --version
is:
arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so it's not 5.4 like you said earlier. I'll work on the tar-extraction method now.
-
• #9
The output of:
arm-none-eabi-gcc --version
is:
arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so it's not 5.4 like you said earlier. I'll work on the tar-extraction method now.
EDIT
I removed the compiler package with
Then, downloaded the tarball ```gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2``` It has a SHA1 hash of ```e87bbefaccbb43d30c084faeb945f4e96e7ec780``` unpacked it into my home folder, and afterward, listing home folder contents with ls:
Desktop Downloads examples.desktop Music Public Videos
Documents Espruino gcc-arm-none-eabi-5_4-2016q3 Pictures TemplatesThen I editted the ```/etc/environment``` file to be ```PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/gcc-arm-none-eabi-5_4-2016q3"``` Rebooted then ```cd ~/Espruino```. At this point, ```make``` returns
LD espruino
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make: *** [espruino] Error 1and ```STM32F411DISCOVERY=1 RELEASE=1 make``` returns
CC targets/stm32/jshardware.o
make: gcc-arm-none-eabi: Command not found
make: *** [targets/stm32/jshardware.o] Error 127
``` -
• #10
make
failing is just because you don't have the stuff installed to build for Linux - that's not an issue.But
gcc-arm-none-eabi: Command not found
is odd, since it should be trying to executearm-none-eabi-gcc
. Did you modify the makefile to work with the compiler you tried previously? -
• #11
I understand that once i fix theCommand not found
issue,make
will sort itself out by taking instructions from the makefileWhat method do you normally use to add a command to the path? In my limitted understanding, I managed to get the/etc/environment
file to work for me before, but if there's a better way, please comment. I'm here again with a freshly installed Ubuntu 14.04 VM.The build process was successful on Arch Linux without a VM. I installed the compiler in the following manner:
yaourt arm-none-eabi-gcc49-linaro
The AUR package took about 30 minutes to build on a 4GHz Core i7
And Espruino took maybe 5 minute to build.Now for the hardware step
Hello, I'm not at all familiar with compiling code, beyond some trusted AUR packages for Linux. All of this is quite foreign. After recieving this error, I went looking in espruino-master which i pulled down previously. I found many ".o" files adjacent to many like-named ".c" and ".h" files. Why are only a few of these ".o" files missing, while they're clearly needed to build a binary?
Also noteworthy is that im using a FT232RL USB-Serial converter and plugging into a breadboard with bare STM32F411CEU6 broken out to 0.1". No peripherals, just the capacitors that ST and my 3.3V regulator calls for. Pin 44(BOOT0) is connected to 3.3V and pin 20(PB2) is connected to GND
Are Rx and Tx supposed to cross on their way from FT232RL to STM32?
Any pointers are appreciated, thank you