<tp>
that technique is what I'm using and it all tested fine
<dave0>
tp: a version of windows had the timer rollover error like in that article :-)
<dave0>
it would crash after 49.7 days
<tp>
dave0, yes, I remember that. Amazingly as Windows users always turn their PC's off after use or they locked up before 49.7 days, it was never a problem
<dave0>
haha
<tp>
the uptime on this FreeBSD pc is exactly the same as my last electricity outage
<dave0>
49.7 was just an upper bound :-)
<tp>
as it never gets turned off
<tp>
I think the longest the power has remained on here without a outage is 115 days
<tp>
I had about 320 days uptime on a old Linux server box once, but long uptimes also mean long unpatched vuln's
<tp>
dave0, in those days it was unusual for a windows box to go 2 weeks without locking up
<tabemann>
back
<tabemann>
I practically never reboot my work laptop, which, as you might assume, runs Windows 10
<tp>
it's been a few years since the 49.7 day windows bug :)
<tp>
tabemann, and 'practically never reboot my laptop' has a whole different meaning to 'never reboot' :)
<tabemann>
well, yes, I hibernate it regularly
<tp>
but it's cool, the 'uptime wars' finished decades ago
<tp>
unless youre a VM rental business I guess ?
<tp>
I noticed a test I was running on a STM32F051 was crashing after a period of time recently and immediately knew what was happening
<tp>
every so often something was left on the stack and eventually all ram was used up
<tp>
i didnt time it to see if the crash was every 49.7 minutes tho ;-)
<tabemann>
lol
<tabemann>
on zeptoforth I limited the stacks to 512 bytes, because I allocate other stuff as well high in RAM, specifically stacks and dictionaries for other tasks
<tabemann>
and after each line of code is entered, it checks for whether the RP and SP are in range
<tp>
Mecrisp-Stellaris does the same checking I guess
<tp>
I occasionally get a 'ram full' or 'flash full' warning
<tp>
always when some program is out of controll
<tp>
-l
<tabemann>
I haven't implemented dictionary bounds checks yet though
<tp>
bbl
WickedShell has quit [Remote host closed the connection]
iyzsong has quit [Remote host closed the connection]
iyzsong has joined #forth
dave0 has joined #forth
jsoft has joined #forth
dddddd has joined #forth
<tp>
tabemann, after much work, my svd2forth now differentiates "read-only" registers in it's output
<tp>
tabemann, as theyre "read-only" it adds a "-?" to the name and appends the "bit@" word before the ":"
<tp>
for single bits: ": IWDG_SR_WVU-? ( -- x ) 2 bit IWDG_SR bit@ ; \ IWDG_SR_WVU, Watchdog counter window value update"
<tp>
for multi bits: ": I2C2_RXDR_RXDATA-? ( %bbbbbbbb -- x ) I2C2_RXDR bit@ ; \ I2C2_RXDR_RXDATA, 8-bit receive data"
dys has joined #forth
<tp>
the latter being a bad example as it's a receive data byte, unless one is looking for a specific byte I gues
iyzsong has quit [Ping timeout: 256 seconds]
iyzsong has joined #forth
reepca has joined #forth
iyzsong has quit [Ping timeout: 256 seconds]
iyzsong has joined #forth
iyzsong has quit [Client Quit]
_whitelogger has quit [Remote host closed the connection]
_whitelogger_ has joined #forth
<tp>
\ I2C2_TXDR (read-write)
<tp>
: I2C2_TXDR_TXDATA ( %bbbbbbbb -- x ) I2C2_TXDR ; \ I2C2_TXDR_TXDATA, 8-bit transmit data
<tp>
in the above case there are only 8 bits that start at bit position 0, so no shifting is needed
<tp>
in this case bitfield "sclh" starts at bit 8
<tp>
: I2C2_TIMINGR_SCLH ( %bbbbbbbb -- x ) 8 lshift I2C2_TIMINGR ; \ I2C2_TIMINGR_SCLH, SCL high period master mode
<tabemann>
wouldn't there be two words for each RW register?
<tp>
in the case of I2C2_TIMINGR_SCLH one use may be "$11111111 I2C2_TIMINGR_SCLH bis!"
<tp>
to set all the bits
<tp>
or "$11111111 I2C2_TIMINGR_SCLH BIC!" to clear all the bits
<tp>
or even just "$11111111 I2C2_TIMINGR_SCLH !"
<tp>
depends what the programmer wants
<tp>
in the case of read-only words they are all input to bit@ as the bits can only be tested not written
<tabemann>
gotcha
<tp>
these are all template words of course, premade to provide the most useful syntax
<tp>
itr had been bugging me for a while now that my existing code treated "read-only" like all the other registers
<tp>
I eventually plan to make a parser that creates the low level config words based on the higher level code
<tp>
by simply pulling out all the bitfield templates corresponding to bitfields named in the higher level part of the program
<tp>
and putting them into a 'config.fs' file
<tabemann>
that's be cool
<tabemann>
*that'd
<tp>
so say you added "$11111111 I2C2_TIMINGR_SCLH BIC!" to your main program and then click make
<tp>
the 'config.fs' file would now contain ": I2C2_TIMINGR_SCLH ( %bbbbbbbb -- x ) 8 lshift I2C2_TIMINGR ; \ I2C2_TIMINGR_SCLH, SCL high period master mode"
<tp>
but I need to study a compiler type application or perhaps practice using Retro to do it instead
<tp>
tempted as I am to do it in shell
<tp>
of course rdrop-exit would say "Id just write all the code" but I still believe he doesnt fully appreciate the extend of the work involved
<tp>
for instance, ADC0 in a GD32Vf103 contains
<tp>
1 peripherals
<tp>
21 registers
<tp>
88 bitfields
<tp>
and to hand enter that stuff from the tech manual which has a lot of errors .... :(
<tabemann>
yeeeah
<tp>
how long would it have taken you to nut out the blinky code from the tech manual only ?
<tp>
a programmer has enough to learn just finding out what 'open drain' or 'push pull' means
<tabemann>
lol
<tabemann>
a while
<tabemann>
I have no clue as to what those mean
<tp>
and thats probably the easiest task that can be done
<tabemann>
well, I did figure out how to use systick just from ARM's documentation
<tp>
it's the hardware world equivalent of "hello world"
<tabemann>
but that was trivial
<tp>
thats because systick is all software
<tp>
any programmer would find systick easy enough
<tp>
systick doesnt interact with the outside world
<tabemann>
okay, well, I should go off to work
<tp>
but systick is vital
<tp>
okies, cya!
<tabemann>
(yes, they're still making me come in unless I'm sick or the weather is inclement)
<tp>
it's 1:30 am here
<tp>
bastards!
<tabemann>
it's 9:30 am here
<tabemann>
see ya
<tp>
as the infection stage is contagious and the patient doesnt know he/she is infected, seems pretty dumb to me
<tabemann>
that's why you tell everyone to not come in
<tabemann>
not just the sick people
<tp>
exactly
<tp>
ah well, good luck :)
<tabemann>
k, off to work
<tp>
bye
<MrMobius>
hmm, I wonder if anyone has made a forth bot like geordi for C
<MrMobius>
like if you type "geordi, int main() {return 2+3;}" it compiles it and runs it then answers back 5
<tp>
sure
<tp>
there was one here, may still be here
<tp>
retrobot
<tp>
CRC had it running here for ages
<tp>
retro: #2 #15 * #12 + n:put
<tp>
but the server it was on needed to be rebuilt
<MrMobius>
neato
<tp>
that code would answer "42"
<MrMobius>
oh hmm, why the #?
<tp>
retrobot was here until a couple of months ago