Open peardox opened 1 week ago
I have added this target. Please test. https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0fp
Tested (with issues)
My first attempt is to simply try updating my already installed pico-cross version
Not a deal-breaker (yet) so hit OK + see what happens
Rats - definitely a problem
OK, now let's try a fresh install in a new directory just in case something was supposed to be added to the old install After OK, add arm/embedded (not sure if this was already done by Pico - it's not noted or anything) Right - arm/embedded went OK, lets try riscv32/embedded again
Failure - as above images
Log file (only includes risvv-32 for some reason) riscv.log
Ahh - there's another longer log in install dir - have that too just in case (but the above is prob the issue) fpcup.log
Well. The log-file tells you all you need. This line:
Makefile:1076: *** No CPUs enabled for given SUBARCH, pass either a SUBARCH or set CPU_UNITS_DEFINED=1 if you know what you are doing. Stop.
When compiling for embedded, you need to define a subarch. So, define a subarch through the subarch button on the cross-tab. The button can be found below the compiler (install/remove-) buttons. My advice would be to use the risrv32 imac subarch.
Well that worked but I'm not overly sure about using something labelled imac on a Windows host
There are, of course, native versions of all GCC stuff
Shouldn't it be somthing more akin to riscv32-none-elf or possibly riscv32-unknown-elf (the latter is used by the C toolchain for pico2 riscv)
The riscv toolchains used by Pico2 for the VSCode plugin are as follows currently
[RISCV_RPI_2_0_0_2] win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-win.zip darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-arm64-mac.zip darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-mac.zip linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x86_64-lin.tar.gz linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-aarch64-lin.tar.gz
Well that worked but I'm not overly sure about using something labelled imac on a Windows host
?
The riscv toolchains used by Pico2 for the VSCode plugin are as follows currently
I just build my own toolchain, binutils only. But I will have a look at these, especially for Mac. Thanks !
This will probably be useful then
Please explain why this is (only) valid for Windows ?
It'll build on anything
Not tried Mac (although I do have a very old one) but definitely works on Windows + Linux x64 and I've see it running on a Pi as well
My main interest was Win but also want to try Linux (+Mac + Pi eventually)
That specific compiler is more bleeding-edge than the stock ones mentiooned above
Well that worked but I'm not overly sure about using something labelled imac on a Windows host
The imac refers to instruction sets supported by the risc-v target: i = integer, m = multiply/divide, a = atomic, c = compressed (16 bit instruction length).
Ahh, that makes sense
Note that the Hazard3 doesn't have float (handled by a library AFAIK)
:-) now I understand !!
I have uploaded new pre release binaries of fpcupdeluxe. They will now download/use the raspberry binary tools. Please test. (to do so, please remove the directory that contains the tools: "riscv32-embedded") https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0fp
It's also worth mentioning that ...
The Pico(1?) had no FP either but also had an optmised FP library The Pico2 has m33 as it's main CPU WITH floating point while the riscv Hazard3 is FP via library (optimisation coming)
At some point (when everything is OK) it may be worth while adding risc to the Pico btn (or having a pico 2 btn). Pico2 is a vast improvement over Pico so likely to be more popular (once in good supply)
Did complete install Subarch still needs selecting but I note that tools are now riscv32-unknown-elf (dunno what they were before)
And - Success
Note that the Hazard3 doesn't have float (handled by a library AFAIK)
FPC doesn't yet support hardware floating point math on risc-v. For interest floating point functionality is indicated by: f - 32 bit single, d - 64 bit double, q - 128 bit quad precision.
People will be queueing up for the fimac :)
It's also got hardware SHA-256 and ARM Trust Zone - not that I imagine there are any codes...
Just installed by using the Pico button on the main app
After everything installed I switched to the cross tab and saw arm/embedded was pre-selected
Trying to select risc32/embedded should theoretically allow compilation for the Pico2 but this option resulted in 'no valid CPU target for embedded'
If you check out the specifications section here you will note that the Pico2 is dual architecture with m33 + risc32 (so there is a valid target)