<feed xmlns='http://www.w3.org/2005/Atom'>
<title>stm32l4.git/src/user, branch ir_leds</title>
<subtitle>My bare metal hacking on an stm32l432
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/'/>
<entry>
<title>Fix kalloc bug.</title>
<updated>2020-11-28T21:46:32+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-28T21:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=0ed233b879675929559fb413dd7e018d5aee26c3'/>
<id>0ed233b879675929559fb413dd7e018d5aee26c3</id>
<content type='text'>
Bitfields are officially stupid. Bizzarre behavior was found in how the
bitfields integers were overflowing and causing other members to change
value, causing really screwy behavior. In addition, with the discovery
of 48k being available to the heap, a 12-bit value was no longer
sufficient to define the size.

I rewrote parts of the kalloc code to allow a generic size for the
kalloc header because now it'll require 2 words per block allocated,
and who knows what size the header will be on different platforms
with more memory.

Unfortunately, the second word of the header consists only of the "used"
bool. Because I wish to keep alignmennt with 32-bit words, 31 bits are
"wasted." However, these bits are used as a canary value to detect
heap corruption, so they're not completely wasted.

Also, testing was broken since adding the huge amount of platform
dependent code for doing system calls. These dependent parts were
put under a macro guard so they don't interfere with the x86 testing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bitfields are officially stupid. Bizzarre behavior was found in how the
bitfields integers were overflowing and causing other members to change
value, causing really screwy behavior. In addition, with the discovery
of 48k being available to the heap, a 12-bit value was no longer
sufficient to define the size.

I rewrote parts of the kalloc code to allow a generic size for the
kalloc header because now it'll require 2 words per block allocated,
and who knows what size the header will be on different platforms
with more memory.

Unfortunately, the second word of the header consists only of the "used"
bool. Because I wish to keep alignmennt with 32-bit words, 31 bits are
"wasted." However, these bits are used as a canary value to detect
heap corruption, so they're not completely wasted.

Also, testing was broken since adding the huge amount of platform
dependent code for doing system calls. These dependent parts were
put under a macro guard so they don't interfere with the x86 testing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Basic SPI working.</title>
<updated>2020-11-26T08:17:44+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-26T08:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=4b8b2de19ed10c84d7a298c05907a1471bdf7077'/>
<id>4b8b2de19ed10c84d7a298c05907a1471bdf7077</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to jump to a usermode init routine.</title>
<updated>2020-11-25T23:53:24+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-25T23:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=ee89199793683b3120a55f1c1887e12333c5ea7e'/>
<id>ee89199793683b3120a55f1c1887e12333c5ea7e</id>
<content type='text'>
This routine will has a newly allocated stack.

I found out that when using the st-flash utility it likes to reset the
device with the IPSR in HARD FAULT mode (?) so I have to manually hit
the reset button to get it to work.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This routine will has a newly allocated stack.

I found out that when using the st-flash utility it likes to reset the
device with the IPSR in HARD FAULT mode (?) so I have to manually hit
the reset button to get it to work.
</pre>
</div>
</content>
</entry>
<entry>
<title>Primitive ability to call kernel code from userspace.</title>
<updated>2020-11-25T22:47:02+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-25T22:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=6d22b0dfc7761a605758552d5824f8039ac5a00f'/>
<id>6d22b0dfc7761a605758552d5824f8039ac5a00f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
