<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/ports/litex, branch 6.0.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-10-15T20:34:19+00:00</updated>
<entry>
<title>no _bleio for litex; ESP32S2 defines BIT() already</title>
<updated>2020-10-15T20:34:19+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-10-15T20:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1d05ad6b22bedc52c5a1b9e44e806aa09fafd16c'/>
<id>urn:sha1:1d05ad6b22bedc52c5a1b9e44e806aa09fafd16c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge pull request #3554 from gamblor21/move_ordereddict</title>
<updated>2020-10-15T02:39:04+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@adafruit.com</email>
</author>
<published>2020-10-15T02:39:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f1e8f2b404ef45edf08b019c1e68d595aa69b357'/>
<id>urn:sha1:f1e8f2b404ef45edf08b019c1e68d595aa69b357</id>
<content type='text'>
Moved ORDEREDDICT define to central location</content>
</entry>
<entry>
<title>Moved ORDEREDDICT define to central location</title>
<updated>2020-10-13T23:52:27+00:00</updated>
<author>
<name>gamblor21</name>
<email>mark.komus@gmail.com</email>
</author>
<published>2020-10-13T23:52:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4270061db491bae1e7cca9ca2cbed5db70f9062e'/>
<id>urn:sha1:4270061db491bae1e7cca9ca2cbed5db70f9062e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Finer grained, per port tick locking</title>
<updated>2020-10-13T01:43:21+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-10-13T01:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=379e73af2e55b1f0c517883360e29d5dbc27a20b'/>
<id>urn:sha1:379e73af2e55b1f0c517883360e29d5dbc27a20b</id>
<content type='text'>
Fixes #3504 hopefully.
</content>
</entry>
<entry>
<title>Add some NORETURN attributes</title>
<updated>2020-09-28T23:55:56+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-09-24T16:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=726dcdb60aa84b5070e5484a19e896abdaffeb93'/>
<id>urn:sha1:726dcdb60aa84b5070e5484a19e896abdaffeb93</id>
<content type='text'>
I have a function where it should be impossible to reach the end, so I put in a safe-mode reset at the bottom:
```
int find_unused_slot(void) {
    // precondition: you already verified that a slot was available
    for (int i=0; i&lt;NUM_SLOTS; i++) {
        if( slot_free(i)) {
            return i;
        }
    }
    safe_mode_reset(MICROPY_FATAL_ERROR);
}
```
However, the compiler still gave a diagnostic, because safe_mode_reset was not declared NORETURN.

So I started by teaching the compiler that reset_into_safe_mode never returned.  This leads at least one level deeper due to reset_cpu needing to be a NORETURN function.  Each port is a little different in this area.  I also marked reset_to_bootloader as NORETURN.
Additional notes:

 * stm32's reset_to_bootloader was not implemented, but now does a bare reset.  Most stm32s are not fitted with uf2 bootloaders anyway.
 * ditto cxd56
 * esp32s2 did not implement reset_cpu at all.  I used esp_restart().  (not tested)
 * litex did not implement reset_cpu at all.  I used reboot_ctrl_write.  But notably this is what reset_to_bootloader already did, so one or the other must be incorrect (not tested).  reboot_ctrl_write cannot be declared NORETURN, as it returns unless the special value 0xac is written), so a new unreachable forever-loop is added.
 * cxd56's reset is via a boardctl() call which can't generically be declared NORETURN, so a new unreacahble "for(;;)" forever-loop is added.
 * In several places, NVIC_SystemReset is redeclared with NORETURN applied.  This is accepted just fine by gcc.  I chose this as preferable to editing the multiple copies of CMSIS headers where it is normally declared.
 * the stub safe_mode reset simply aborts.  This is used in mpy-cross.
</content>
</entry>
<entry>
<title>Merge pull request #15 from adafruit/main</title>
<updated>2020-07-25T01:29:53+00:00</updated>
<author>
<name>DavePutz</name>
<email>dwputz@gmail.com</email>
</author>
<published>2020-07-25T01:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3dfed3c4aa52d06bd2eb1c28d0a1916821cc3f80'/>
<id>urn:sha1:3dfed3c4aa52d06bd2eb1c28d0a1916821cc3f80</id>
<content type='text'>
update from main</content>
</entry>
<entry>
<title>Finish common-hal pin API</title>
<updated>2020-07-24T16:29:18+00:00</updated>
<author>
<name>Lucian Copeland</name>
<email>hierophect@gmail.com</email>
</author>
<published>2020-07-24T16:29:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=356b1a8d6dd9830d452eddc63f3c8bc890fa12f8'/>
<id>urn:sha1:356b1a8d6dd9830d452eddc63f3c8bc890fa12f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Changes to optimization option</title>
<updated>2020-07-24T00:27:02+00:00</updated>
<author>
<name>root</name>
<email>siehputz@gmail.com</email>
</author>
<published>2020-07-24T00:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=778e8bfda97868b6a29fe5e4656aa2c2e2dd4378'/>
<id>urn:sha1:778e8bfda97868b6a29fe5e4656aa2c2e2dd4378</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Changes to add compiler optimization option</title>
<updated>2020-07-22T17:44:41+00:00</updated>
<author>
<name>root</name>
<email>siehputz@gmail.com</email>
</author>
<published>2020-07-22T17:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d83a4ac72db90253089fb33e6f01d6da8f99f8b3'/>
<id>urn:sha1:d83a4ac72db90253089fb33e6f01d6da8f99f8b3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add option for higher optimization levels</title>
<updated>2020-07-21T15:11:08+00:00</updated>
<author>
<name>root</name>
<email>siehputz@gmail.com</email>
</author>
<published>2020-07-21T15:11:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=49decf90c940f2e9810abcf40939db33a5803ab0'/>
<id>urn:sha1:49decf90c940f2e9810abcf40939db33a5803ab0</id>
<content type='text'>
</content>
</entry>
</feed>
