<feed xmlns='http://www.w3.org/2005/Atom'>
<title>stm32l4.git/include/kern, branch broken_linker</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>Refactor the linker script to make more sense.</title>
<updated>2022-12-09T22:20:40+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2022-12-09T22:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=ac25063e15d7aa645f7567b9bdb0726e5c332fd6'/>
<id>ac25063e15d7aa645f7567b9bdb0726e5c332fd6</id>
<content type='text'>
Specifically this moves the inits into the .text section.

This also move the data and bss segments into sram2 to give the heap and
stack more space to work with in sram1.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Specifically this moves the inits into the .text section.

This also move the data and bss segments into sram2 to give the heap and
stack more space to work with in sram1.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'christmas' into HEAD</title>
<updated>2021-10-26T06:10:06+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-10-26T06:10:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=f9b12f748b557994b958115c04fd1591b322248e'/>
<id>f9b12f748b557994b958115c04fd1591b322248e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed annoying bug with bootup when compiling with new GCC.</title>
<updated>2021-10-26T06:04:44+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-10-26T06:04:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=dbbe83bd8882fe18e26f6305a1f425145bfea8db'/>
<id>dbbe83bd8882fe18e26f6305a1f425145bfea8db</id>
<content type='text'>
The problem was the BSS segment was not aligned with size 4,
thus the routine to clear the BSS segment was infinite looping,
clobbering everything in it's wake until it ran off the memory edge and
caused a hard fault.

This commit does a couple of things.

  1. Fixes the alignment issue in the linker script
  2. Panics if the bss/data segments are not aligned properly
  3. Makes the logging the _first_ thing to initialize. Much easier to
     debug that way!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was the BSS segment was not aligned with size 4,
thus the routine to clear the BSS segment was infinite looping,
clobbering everything in it's wake until it ran off the memory edge and
caused a hard fault.

This commit does a couple of things.

  1. Fixes the alignment issue in the linker script
  2. Panics if the bss/data segments are not aligned properly
  3. Makes the logging the _first_ thing to initialize. Much easier to
     debug that way!
</pre>
</div>
</content>
</entry>
<entry>
<title>Completed ws2812b 2020 Christmas Lights.</title>
<updated>2021-09-28T04:56:46+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-09-28T04:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=90eb3a0b79bfef67c70dc545b49c48928eea05f4'/>
<id>90eb3a0b79bfef67c70dc545b49c48928eea05f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added header files implementing a basic AVL tree and Map based off it.</title>
<updated>2020-12-06T09:00:43+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-06T09:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=1710871aa1958c2cac38e4b372964ef22032ed4a'/>
<id>1710871aa1958c2cac38e4b372964ef22032ed4a</id>
<content type='text'>
These headers take inspiration from the linked list and array list
headers as a way to provide primitive templates in C. This time
they implement an AVL tree and Map template (which uses the AVL tree).

Included are relatively robust tests, though they could be improved.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These headers take inspiration from the linked list and array list
headers as a way to provide primitive templates in C. This time
they implement an AVL tree and Map template (which uses the AVL tree).

Included are relatively robust tests, though they could be improved.
</pre>
</div>
</content>
</entry>
<entry>
<title>Got a very basic external interrupt to work.</title>
<updated>2020-12-05T08:53:33+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T08:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=de81911ef4c15a9518acf32f61ad2d7d0e2f156f'/>
<id>de81911ef4c15a9518acf32f61ad2d7d0e2f156f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added kernel-level abstraction over the spi interface.</title>
<updated>2020-12-05T06:16:31+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T06:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=7002cb8380406173407c9e8c8d16ebd670fff55c'/>
<id>7002cb8380406173407c9e8c8d16ebd670fff55c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add systick/...</title>
<updated>2020-12-05T03:34:20+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T03:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=83deae717de8b940b0cb04d1d1989b0a4c250e35'/>
<id>83deae717de8b940b0cb04d1d1989b0a4c250e35</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Some LED lights working. Not great. WIP</title>
<updated>2020-11-29T06:21:22+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-29T06:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=fd674424d19cf12c1186394606729cff236d5bdf'/>
<id>fd674424d19cf12c1186394606729cff236d5bdf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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>
</feed>
