You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Tomasz CEDRO <to...@cedro.info> on 2021/10/16 16:23:07 UTC
FreeBSD/BSD: tools/configure.sh + make vs gmake
I have managed to build and install Debian version of
kconfig-frontends. Local testing for now.
The problem I have encountered now is the `tools/configure.sh` uses
`make` for builds. On BSD systems BSD version of `make` is used by
default. GNU make is named `gmake` here.
Will try to patch that out.
That gives +1 for cmake build system as it detects and solves make vs gmake :-)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
FreeBSD/BSD: esp32-c3 / risc-v + compiler problem
Posted by Tomasz CEDRO <to...@cedro.info>.
After fixing the kconfig and tools/configure problem now we need to
fix the compiler / toolchain detection issue on esp32-c3 risc-v.
(venv38zephyr) ./tools/configure.sh esp32c3-devkit:ble
No configuration change.
(venv38zephyr) gmake
Create .version
Create version.h
gmake[1]: Entering directory '/XXX/nuttx.git/nuttx/boards'
gmake[1]: Nothing to be done for 'dirlinks'.
gmake[1]: Leaving directory '/XXX/nuttx.git/nuttx/boards'
gmake[1]: Entering directory '/XXX/nuttx.git/apps'
gmake[2]: Entering directory '/XXX/nuttx.git/apps/platform'
LN: platform/board to /XXX/nuttx.git/apps/platform/dummy
gmake[2]: Leaving directory '/XXX/nuttx.git/apps/platform'
gmake[1]: Leaving directory '/XXX/nuttx.git/apps'
gmake[1]: Entering directory '/XXX/nuttx.git/nuttx/boards'
gmake[2]: Entering directory
'/XXX/nuttx.git/nuttx/boards/risc-v/esp32c3/esp32c3-devkit/src'
gmake[2]: gcc: No such file or directory
gmake[2]: *** [Makefile:118:
/XXX/nuttx.git/nuttx/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_out.ld]
Error 127
gmake[2]: Leaving directory
'/XXX/nuttx.git/nuttx/boards/risc-v/esp32c3/esp32c3-devkit/src'
gmake[1]: *** [Makefile:105: context] Error 2
gmake[1]: Leaving directory '/XXX/nuttx.git/nuttx/boards'
gmake: *** [tools/Makefile.unix:341: context] Error 2
For some reason it wants to use standard GCC not the RISC-V GCC. Any
hints welcome :-)
The OS is FreeBSD 13.0-STABLE AMD64. I have both ESP-IDF and FreeBSD
compilers + binutils available.
(venv38zephyr) uname -a FreeBSD 0xCFMX4 13.0-STABLE FreeBSD
13.0-STABLE #0 stable/13-n247642-39a1ff43ad7: Tue Oct 12 12:31:41 CEST
2021 root@0xCFMX4:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
(venv38zephyr) pkg search -x riscv
riscv-isa-sim-g_20201102 Spike, a RISC-V ISA Simulator
riscv32-unknown-elf-binutils-2.37_1,1 GNU binary tools
riscv32-unknown-elf-gcc-8.4.0_3 GNU Compiler Collection for bare metal
riscv32 cross-development
riscv64-binutils-2.37_1,1 GNU binary tools
riscv64-gcc-8.3.0_1 Cross GNU Compiler Collection for riscv64
riscv64-gcc9-9.3.0_1 Cross GNU Compiler Collection for riscv64
riscv64-none-elf-binutils-2.37_1,1 GNU binary tools
riscv64-none-elf-gcc-8.4.0_3 GNU Compiler Collection for bare metal
riscv64 cross-development
u-boot-qemu-riscv64-2021.07 Cross-build das u-boot for model qemu-riscv64
(venv38zephyr) ls ~/.espressif/tools/zephyr/
openocd-esp32/ riscv32-esp-elf/ xtensa-esp32-elf/
xtensa-esp32s2-elf/
(venv38zephyr) ls ~/.espressif/tools/zephyr/riscv32-esp-elf/bin/riscv32-esp-elf-
riscv32-esp-elf-addr2line* riscv32-esp-elf-ct-ng.config*
riscv32-esp-elf-gcc-ranlib* riscv32-esp-elf-ld*
riscv32-esp-elf-size*
riscv32-esp-elf-ar* riscv32-esp-elf-elfedit*
riscv32-esp-elf-gcov* riscv32-esp-elf-ld.bfd*
riscv32-esp-elf-strings*
riscv32-esp-elf-as* riscv32-esp-elf-g++*
riscv32-esp-elf-gcov-dump* riscv32-esp-elf-nm*
riscv32-esp-elf-strip*
riscv32-esp-elf-c++* riscv32-esp-elf-gcc*
riscv32-esp-elf-gcov-tool* riscv32-esp-elf-objcopy*
riscv32-esp-elf-c++filt* riscv32-esp-elf-gcc-8.4.0*
riscv32-esp-elf-gdb* riscv32-esp-elf-objdump*
riscv32-esp-elf-cc@ riscv32-esp-elf-gcc-ar*
riscv32-esp-elf-gdb-add-index* riscv32-esp-elf-ranlib*
riscv32-esp-elf-cpp* riscv32-esp-elf-gcc-nm*
riscv32-esp-elf-gprof* riscv32-esp-elf-readelf*
I am working on the NuttX upstream master fork:
(venv38zephyr) git log -3
commit fefadc2e2d190ad0eb671cfef017a82301321ea9 (HEAD ->
cederom-tools_configure-bsd_make_vs_gnu_make,
origin/cederom-tools_configure-bsd_make_vs_gnu_make)
Author: Tomasz 'CeDeROM' CEDRO <to...@cedro.info>
Date: Sat Oct 16 18:30:54 2021 +0200
tools/configure.sh: Detect and use GNU make (gmake) on BSD platforms.
Linux uses GNU Make as default, command is `make`.
BSD uses BSD Make as default, command is also `make`.
BSD can also use GNU Make, but the command is `gmake`.
This patch uses `make` on GNU platforms and `gmake` on BSD platforms.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <to...@cedro.info>
commit 8b67944c75b81d17174bd207ad63acfa22da8983 (upstream/master,
upstream/HEAD, master)
Author: Xiang Xiao <xi...@xiaomi.com>
Date: Thu Oct 14 11:03:07 2021 +0800
sched: Remove pidhash_s and move ticks to tcb_s
simplify the code logic and reduce memory a little bit
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
commit 13741c9017bc2884f31c41db18405be271f20d70
Author: chao.an <an...@xiaomi.com>
Date: Tue Sep 7 22:54:47 2021 +0800
sched/pidhash: init g_pidhash to NULL to avoid wild pointer
Signed-off-by: chao.an <an...@xiaomi.com>
(venv38zephyr) git remote -v
origin git@github.com:cederom/incubator-nuttx.git (fetch)
origin git@github.com:cederom/incubator-nuttx.git (push)
upstream https://github.com/apache/incubator-nuttx.git (fetch)
upstream https://github.com/apache/incubator-nuttx.git (push)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Re: FreeBSD/BSD: tools/configure.sh + make vs gmake
Posted by Tomasz CEDRO <to...@cedro.info>.
On Fri, Oct 22, 2021 at 4:22 PM Gregory Nutt wrote:
> Off Topic: Tomasz, did you notice this:
> https://www.hackster.io/news/65f02-is-a-100-mhz-drop-in-replacement-for-vintage-8-bit-computers-ef667b0ebed3?mc_cid=371311109e&mc_eid=524337f8e9
>
> That would beef up your Commodore C64!
Whoah thanks Gregory! :-) I am more from the Atari school but the CPU
is the same so we may try that out :-) :-)
I will also share this news with my C64 friends.. they are so "radical
analog" so they build adapters to dump ROM files onto various magnetic
tapes (not the other way lol) just to enjoy the analog loading :-) :-)
:-)
I need to get familiar with NuttX RTOS make some projects on it and
one day I would really love to run it on bare 8-bit Atari :-)
We may then add Ethernet / WiFi adapter to such small Atari.. and
guess what the card will also run on NuttX =)
Some folks already did "FijuNet" WiFi card for 8-bit Atari based on
ESP chips :-)
https://www.youtube.com/watch?v=qZx1aCD1G4Y
8-BIT POWERS!! =)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Re: FreeBSD/BSD: tools/configure.sh + make vs gmake
Posted by Gregory Nutt <sp...@gmail.com>.
Off Topic: Tomasz, did you notice this:
https://www.hackster.io/news/65f02-is-a-100-mhz-drop-in-replacement-for-vintage-8-bit-computers-ef667b0ebed3?mc_cid=371311109e&mc_eid=524337f8e9
That would beef up your Commodore C64!
Re: FreeBSD/BSD: tools/configure.sh + make vs gmake
Posted by Tomasz CEDRO <to...@cedro.info>.
On Sat, Oct 16, 2021 at 6:37 PM Tomasz CEDRO wrote:
>
> On Sat, Oct 16, 2021 at 6:23 PM Tomasz CEDRO wrote:
> >
> > I have managed to build and install Debian version of
> > kconfig-frontends. Local testing for now.
> >
> > The problem I have encountered now is the `tools/configure.sh` uses
> > `make` for builds. On BSD systems BSD version of `make` is used by
> > default. GNU make is named `gmake` here.
> >
> > Will try to patch that out.
> >
> > That gives +1 for cmake build system as it detects and solves make vs gmake :-)
>
> Quick fix proposition:
> https://github.com/apache/incubator-nuttx/pull/4672
>
> Is there any better place for this detection?
>
> Is there any kind of "global configuration" file for all scripts where
> this could be put to affect all bash scripts?
Here goes updated fix that contains `configure.sh`, `configure.c` and
`sethost.sh` updates:
https://github.com/apache/incubator-nuttx/pull/4673
I have added `-B` switch for BSD. `-b` is already taken by `configure.c`.
`sethost.sh` performs host autodetection. I think this could be also
implemented in `configure.sh` and then overriden by parameters switch,
so if no switch is present host will be autodetected. That would
simplify project (re)configuration.
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Re: FreeBSD/BSD: tools/configure.sh + make vs gmake
Posted by Tomasz CEDRO <to...@cedro.info>.
On Sat, Oct 16, 2021 at 6:23 PM Tomasz CEDRO wrote:
>
> I have managed to build and install Debian version of
> kconfig-frontends. Local testing for now.
>
> The problem I have encountered now is the `tools/configure.sh` uses
> `make` for builds. On BSD systems BSD version of `make` is used by
> default. GNU make is named `gmake` here.
>
> Will try to patch that out.
>
> That gives +1 for cmake build system as it detects and solves make vs gmake :-)
Quick fix proposition:
https://github.com/apache/incubator-nuttx/pull/4672
Is there any better place for this detection?
Is there any kind of "global configuration" file for all scripts where
this could be put to affect all bash scripts?
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info