<jrtc27>
but why does anyone care about using it to build openocd
<jrtc27>
it has one sensible use in this decade: bootstrapping a modern toolchain
ball has joined #riscv
hightower2 has quit [Ping timeout: 260 seconds]
prabhakarlad has quit [Quit: Client closed]
<muurkha>
I think there are people who don't want to use C++
unnick has joined #riscv
unnick has quit [Ping timeout: 268 seconds]
shamoe has joined #riscv
unnick has joined #riscv
crossdev has joined #riscv
aredridel8 has joined #riscv
aredridel has quit [Quit: Ping timeout (120 seconds)]
aredridel8 is now known as aredridel
Stat_headcrabed has quit [Quit: Stat_headcrabed]
mahk has quit [Ping timeout: 252 seconds]
mahk has joined #riscv
unnick has quit [Ping timeout: 260 seconds]
KombuchaKip has quit [Quit: Leaving.]
mahk has quit [Changing host]
mahk has joined #riscv
mlw has quit [Ping timeout: 252 seconds]
hightower3 has quit [Read error: Connection reset by peer]
mlw has joined #riscv
unnick has joined #riscv
hightower2 has joined #riscv
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #riscv
unnick has quit [Ping timeout: 268 seconds]
KombuchaKip has joined #riscv
ldevulder has quit [Ping timeout: 255 seconds]
ldevulder has joined #riscv
drmpeg has left #riscv [#riscv]
drmpeg has joined #riscv
jmdaemon has joined #riscv
Andre_Z has joined #riscv
paulk-bis has quit [Quit: WeeChat 3.0]
paulk has joined #riscv
vagrantc has joined #riscv
clemens3 has quit [Ping timeout: 246 seconds]
<sevan>
If you're on an ancient system, it means that you have to go via an intermediary compiler in this case GCC 4.7.
<sevan>
I don't think think it is driven by contempt for C++
<sevan>
jrtc27: because for some, they're not in an ivory tower who gets hardware from vendors and it makes things accesible. Fish out something from a bin & put it to use.
BootLayer has quit [Quit: Leaving]
<jrtc27>
it's a 10 year old compiler
<jrtc27>
June 2014
<jrtc27>
if you use 4.7.4, the final point release
<jrtc27>
4.7.0 was March *2012*
<jrtc27>
even the Linux kernel is documented as requiring GCC 5.1+
<jrtc27>
I really struggle to see how you can live in 2024 and only have access to GCC 4.7
<jrtc27>
yet expect to be able to use other modern software
<sevan>
C99 support was finalised in GCC v4.6
<heat>
i don't see how hardware is an excuse not to use more modern GCCs
<heat>
unless you use really niche targets like vax- or ia64- that sometimes rot/get removed
<jrtc27>
gcc supported ia64 way past 4.7
<heat>
yeah
<sevan>
hardware will drive your ability to run modern compilers. if it takes a day+ to build the compiler before you get to build the thing you actually wanted is a bit of a detractor.
<sevan>
but this is in a personal capacity, I guess there are neiche business scenarios where ancient systems are maintained but I'm not arguing for that.
<jrtc27>
if it takes a day+ to build the compiler, why is that the machine you're using for your development
<sevan>
because I can
<jrtc27>
you can buy a not very new computer for peanuts and get better compile times than that...
<jrtc27>
hell even the not very fast riscv dev boards out there like the unmatched build llvm in less than a day
<sevan>
what makes you think I don't have shiny things too? :)
<jrtc27>
either you take a day to build a modern compiler, or you waste many days having to hack software to be compatible with your antique environment
<jrtc27>
and as time passes more and more software becomes incompatible, and fewer and fewer people will want to take any relevant fixes
<sevan>
there's a practical use to building against the older compilers, it's a free reality check for requirements. With the new language standards added, the requirements from a code base get blured. So the expection is "should would with anything supporting c99" but reality is that you now have c11 feature dependency.
<sevan>
jrtc27: and that's ok, but more cases than not, folks want to accept the patches
<sevan>
s/should would/should work
<jrtc27>
it's 2024, C11 should be a given, at least outside the Windows world where Microsoft were slow to adopt it (though even then I think it's been long enough since MSVC gained support for the core parts of it?)
<jrtc27>
ditto C++14
<jrtc27>
C17 and C++17 are borderline
<sevan>
not when you reckon your code base in c99 based.
<muurkha>
sdcc also fails to support even a lot of C99 stuff
* sevan
looks up sdcc
<muurkha>
it's the best compiler for, uh, the 8051
<muurkha>
well, maybe the PIC is as popular as the AVR. I don't know what Microchip's shitty C compiler supports but I doubt it's C99 either
lockna has joined #riscv
<muurkha>
hopefully the WCH32V003 will blow away a lot of this cruft. it's cheaper than any AVR or PIC and it's RISC-V
<muurkha>
the peripherals are clones of the STM8S003, which ST has, as I said, recommended people move off of
<muurkha>
mostly! it also has an op-amp built in, which the ST chip doesn't
lockna has quit [Client Quit]
ball has quit [Ping timeout: 256 seconds]
lockna has joined #riscv
<sevan>
I've got an GCC 13.2 arm cross complier for my ppc mac, haven't built the risc-v one yet. Not played wth 8 bit microcontrollers but I have stm32 & the 2nd gen risc-v microcontroller
<muurkha>
the AVR is pretty convenient; no wrestling with vendor toolchains or vendor libraries, all the I/O registers are properly documented, and timing is pretty deterministic (though interrupt latency can vary by a clock cycle)
<gurki>
also ancient by 24 metrics
<muurkha>
but you could do better. the in-system programming protocol requires four wires, six if you count power and ground
<muurkha>
and they're pretty slow and power-hungry
ZipCPU has quit [Ping timeout: 255 seconds]
<muurkha>
yeah, ancient is great, but I'd appreciate having more than 2K of RAM and more than 20 MIPS
<muurkha>
and being able to run code from RAM
<gurki>
i didnt mean that in a good way :>
ZipCPU has joined #riscv
<muurkha>
I know ;)
<muurkha>
but it is a good thing
<muurkha>
and the AVR doesn't need a lot of support circuitry. a lot of times you can just hook one up to USB power lines or a coin cell and let it gronk, without so much as a bypass capacitor
<muurkha>
the WCH32V003 is also 5-volt tolerant according to the datasheet (in the 最大值 column it says 5.5 volts) but I don't have one here to test
<muurkha>
they did eventually make an English datasheet for the thing too, I thought I had it here somewhere
jmdaemon has joined #riscv
dilfridge is now known as colafridge
colafridge is now known as dilfridge
* sevan
looks up WCH32V003
<sevan>
"CH32V003 is an ultra-cheap RISC-V MCU with 2KB SRAM, 16KB flash, and up to 18 GPIOs that sells for under $0.10"
<muurkha>
sorry, the actual part number is CH32V003, yes
<muurkha>
it's not under US$0.10 anymore, the dollar has fallen against the renminbi since then
<sevan>
:D
<muurkha>
it's now 12.34¢
<muurkha>
I think it doesn't have a hardware multiply so it's probably actually slower than an ATmega328 at DSPish stuff
hightower2 has quit [Read error: Connection reset by peer]
<muurkha>
despite running at 20MHz instead of 48MHz. the CH32V003 doesn't use the standard RISC-V interrupt mechanism, instead doing its own FIQish thing, so it is probably faster at interrupt handling than the AVR
jfsimon1981 has quit [Remote host closed the connection]
prabhakarlad has joined #riscv
ball has quit [Ping timeout: 240 seconds]
<mwette>
the thing about gcc-4.7 is that it can build gcc-13.2
<mwette>
I use avr-gcc v 8.3, but I'm guessing gcc-13 can be compiled for avr
<sevan>
I've had to resort to GCC 7 to build 13.2 since GCC 5.5 would generate something that the ancient linker would complain about on ancient OS X
<mwette>
There was near-death experience when CC0 was removed from gcc, but that got done.
<mwette>
for avr
___nick___ has joined #riscv
<sevan>
found my hifix 1 rev b board.
ball has joined #riscv
<sevan>
s/hifix/hifive
jmdaemon has quit [Ping timeout: 260 seconds]
davidlt has quit [Ping timeout: 276 seconds]
Andre_Z has quit [Quit: Leaving.]
<muurkha>
CC0?
<sevan>
going back to a comment yesterday, in order to use the SiFive HiFive 1 Rev B with OpenOCD, I have to use a fork of OpenOCD? I see "interface/jlink.cf" in latest release of OpenOCD but nothing target/board related.
___nick___ has quit [Ping timeout: 256 seconds]
jmdaemon has joined #riscv
maxinux has quit [Quit: Brb]
maxinux has joined #riscv
crossdev has quit [Remote host closed the connection]
EchelonX has joined #riscv
<sorear>
muurkha: it's some piece of generic code in gcc that was used by some architectures for condition code handling
shamoe has quit [Quit: Connection closed for inactivity]
KREYREN has quit [Remote host closed the connection]
KREYREN has joined #riscv
ldevulder has quit [Ping timeout: 268 seconds]
<sevan>
If you run the Segger J-Flash utility, it'll detect a SiFive HiFive 1 board and offer a firmware update. Your device will then report itself as the BBC Dr Who HiFive Inventor Kit
<sevan>
Downloading serial number file to emulator... - Connecting via USB to probe/ programmer device 0 - Updating firmware: J-Link OB-K22-SiFive compiled Nov 7 2022 16:21:52 - Replacing firmware: J-Link OB-K22-SiFive compiled Oct 30 2020 11:20:31
<sevan>
"BBC Dr. Who HiFive Inventor Coding Kit website HiFiveInventor.com"
ldevulder has joined #riscv
ezulian has quit [Ping timeout: 256 seconds]
ntwk has joined #riscv
EchelonX has quit [Remote host closed the connection]