Severin Teona - SAOC Milestone 1 Update 2 - Druntime for Microcontrollers
kinke
noone at nowhere.com
Wed Sep 30 21:22:55 UTC 2020
On Wednesday, 30 September 2020 at 16:35:05 UTC, Severin Teona
wrote:
> 1. During the installation, because I was using
> ‘arm-none-eabi-gcc’, I got the following messages:
>
> — The C compiler identification is GNU 9.3.1
> — Detecting C compiler ABI info
> — Detecting C compiler ABI info - failed
> — Detecting C compile features
> — Detecting C compile features - done
> — The ASM compiler identification is GNU
> — Found assembler:
> /home/teona/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc
> — Looking for sys/types.h
> — Looking for sys/types.h - not found
> — Looking for stdint.h
> — Looking for stdint.h - not found
> — Looking for stddef.h
> — Looking for stddef.h - not found
> — Check size of void*
> — Check size of void* - failed
> — Looking for unistd.h
> — Looking for unistd.h - not found
> — Configuring done
> — Generating done
>
> Both the build and the linking parts were succesful, but I
> wanted to ask you if I should care about those messages, or if
> they appear because I wasn’t using ‘gcc’.
Seems okay for the moment, although the failing `size of void*`
test certainly isn't ideal (IIRC, we make use of it in the CMake
script). But no need to worry for now if things seem to be
working.
> 2. Also, I tried building the runtime without
> ‘BUILD_SHARED_LIBS=OFF’ and it failed, as it was looking for
> some dynamic libraries (-lpthread, -ldl, -lrt, and so on). My
> question here is, does abynody here know if there exists a set
> of dynamic libraries, compiled for this architecture? With
> TockOS, I’ve been using newlib([2]) as C standard library, but
> newlib is a static library. Would it make a big difference if I
> used a dynamic library?
I strongly suggest not caring about the shared druntime/Phobos
libs for now, those introduce lots of complexity, especially wrt.
TLS, so focus on the static libs first (or even exclusively).
> My plan for next week is:
> - to try to emulate a Cortex-M4 device using qemu - the biggest
> issue I have here is that there are just 2 Cortex-M4 based
> devices that can be emulated, and the resources(64KB of RAM and
> 256KB of flash) are way smaller than what I need (>2.5MB flash
> - the current size of the compiled runtime).
I'm definitely no qemu expert, but are you sure you can't use the
generic `virt` machine via something like `-M virt -m 1024 -cpu
cortex-m4`?
For reference, here's what I use for emulating AArch64 (on a
Windows host), giving it 3 cores and 6 GB of RAM:
"C:\Program Files\qemu\qemu-system-aarch64" -M virt -m 6144 -cpu
cortex-a57 -smp 3 -kernel vmlinuz -initrd initrd.img -append
"root=/dev/vda1" -drive if=none,file=disk.raw,format=raw,id=hd
-device virtio-blk-device,drive=hd -netdev
user,id=mynet,hostfwd=tcp::2222-:22 -device
virtio-net-device,netdev=mynet
More information about the Digitalmars-d
mailing list