<feed xmlns='http://www.w3.org/2005/Atom'>
<title>stm32l4.git, branch master</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 the linker script to put the .got section in flash.</title>
<updated>2022-12-12T22:52:29+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2022-12-12T22:52:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=529f90444c8f76513f1c5d571e4bc2f2563029a6'/>
<id>529f90444c8f76513f1c5d571e4bc2f2563029a6</id>
<content type='text'>
The .got section contains global variables an offsets. Specifically it
contains the linker script variables. The linker will automatically put
this section .data, which is not what we want because those values will
not be initialized.

So we put the .got section in flash so the value is initialized.

Without this, there is bizarre behavior on some compilers where linker
variables will be undefined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The .got section contains global variables an offsets. Specifically it
contains the linker script variables. The linker will automatically put
this section .data, which is not what we want because those values will
not be initialized.

So we put the .got section in flash so the value is initialized.

Without this, there is bizarre behavior on some compilers where linker
variables will be undefined.
</pre>
</div>
</content>
</entry>
<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>Fixed linker script on desktop</title>
<updated>2022-12-08T21:18:02+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2022-12-08T21:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=2aaf2180aa352c71c43efd548893fffe506397e5'/>
<id>2aaf2180aa352c71c43efd548893fffe506397e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add broken linker stuff to test on desktop.</title>
<updated>2022-12-08T21:01:09+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2022-12-08T21:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=12845efe524e2262e19fcb1e85697c4664e22b2f'/>
<id>12845efe524e2262e19fcb1e85697c4664e22b2f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the ir code for the "Fan" button.</title>
<updated>2022-12-04T21:21:13+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2022-12-04T21:21:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=e9a6c87abab80e83c690b4f695cf4fef27c78702'/>
<id>e9a6c87abab80e83c690b4f695cf4fef27c78702</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add compile_flags.txt</title>
<updated>2021-11-20T21:00:19+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-11-20T21:00:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=46b1473b6a544d7a5c1f3964b4630340e09f1a97'/>
<id>46b1473b6a544d7a5c1f3964b4630340e09f1a97</id>
<content type='text'>
Turns out each flag needs to be on its own newline. That's so annoying!!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out each flag needs to be on its own newline. That's so annoying!!
</pre>
</div>
</content>
</entry>
<entry>
<title>run clang-format.</title>
<updated>2021-10-26T07:55:33+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-10-26T07:55:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=2c94d5baaec9e65550df942cf976db48bd36d9b5'/>
<id>2c94d5baaec9e65550df942cf976db48bd36d9b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Init Level Logging.</title>
<updated>2021-10-26T07:53:55+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-10-26T07:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=969c054e5b1aee7fb034667f09240216ea0c6abf'/>
<id>969c054e5b1aee7fb034667f09240216ea0c6abf</id>
<content type='text'>
The linker script was broken because the init_boundaries were
showing the incorrect value. It's fixed now.

Unfortunately there's a bizarre bug where if I add another
klogf() statement in the run_init_routines() function, I lose
_all_ logging. I have no idea what is causing this! The only thing I can
think of in an honsest-to-god complier bug. It probably has to do with
some bizarre-o optimizations GCC is doing. In the time being I had
to shuffle the finishing routines logging to the init() function
directly ... unfortunate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linker script was broken because the init_boundaries were
showing the incorrect value. It's fixed now.

Unfortunately there's a bizarre bug where if I add another
klogf() statement in the run_init_routines() function, I lose
_all_ logging. I have no idea what is causing this! The only thing I can
think of in an honsest-to-god complier bug. It probably has to do with
some bizarre-o optimizations GCC is doing. In the time being I had
to shuffle the finishing routines logging to the init() function
directly ... unfortunate.
</pre>
</div>
</content>
</entry>
<entry>
<title>I figured out how to align the data section.</title>
<updated>2021-10-26T07:02:04+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-10-26T07:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=23acf071a670719336eafd18d33cdd0e0f02775c'/>
<id>23acf071a670719336eafd18d33cdd0e0f02775c</id>
<content type='text'>
I tried this before, I swear and it didn't work. Not sure what I did to
make it work this time. I guess that goat I sacrificed appeased the
right gods.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I tried this before, I swear and it didn't work. Not sure what I did to
make it work this time. I guess that goat I sacrificed appeased the
right gods.
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed the requirement for the init data to be aligned.</title>
<updated>2021-10-26T06:38:58+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2021-10-26T06:38:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=4507bff773fd4cc540c91c6c3696ac3cf9a21b3c'/>
<id>4507bff773fd4cc540c91c6c3696ac3cf9a21b3c</id>
<content type='text'>
I don't yet know how to configure the the initscript to align the
INIT_DATA_VALUES. Nothing seems to work. But whatever, it seems like
things work and it's a very minor performance hit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I don't yet know how to configure the the initscript to align the
INIT_DATA_VALUES. Nothing seems to work. But whatever, it seems like
things work and it's a very minor performance hit.
</pre>
</div>
</content>
</entry>
</feed>
