<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/supervisor, branch fix_typo_spanish</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=fix_typo_spanish</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=fix_typo_spanish'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-10-17T02:31:32+00:00</updated>
<entry>
<title>Merge pull request #3482 from cwalther/alloc</title>
<updated>2020-10-17T02:31:32+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jeff@adafruit.com</email>
</author>
<published>2020-10-17T02:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3c05a8c68cececcfb38eeefa6208afad2c56d215'/>
<id>urn:sha1:3c05a8c68cececcfb38eeefa6208afad2c56d215</id>
<content type='text'>
Fix inconsistent supervisor heap</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>Unify iMX flash config and add Metro M7 1011</title>
<updated>2020-10-07T22:23:47+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-09-29T02:21:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=09bc4157516dd59754a3eb1a5dbbb72a758ebe93'/>
<id>urn:sha1:09bc4157516dd59754a3eb1a5dbbb72a758ebe93</id>
<content type='text'>
This unifies the flash config to the settings used by the Boot ROM.
This makes the config unique per board which allows for changing
quad enable and status bit differences per flash device. It also
allows for timing differences due to the board layout.

This change also tweaks linker layout to leave more ram space for
the CircuitPython heap.
</content>
</entry>
<entry>
<title>When there is not enough free space, but a matching hole on the other side, use it.</title>
<updated>2020-10-02T21:07:07+00:00</updated>
<author>
<name>Christian Walther</name>
<email>cwalther@gmx.ch</email>
</author>
<published>2020-10-02T21:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=be8092f4d32d06488df88294a9dc4bb809411c5e'/>
<id>urn:sha1:be8092f4d32d06488df88294a9dc4bb809411c5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow allocate_memory() to reuse holes when matching exactly.</title>
<updated>2020-10-02T21:03:21+00:00</updated>
<author>
<name>Christian Walther</name>
<email>cwalther@gmx.ch</email>
</author>
<published>2020-09-29T20:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5bdb8c45dd2700941ab75661b773680bdd46aaf1'/>
<id>urn:sha1:5bdb8c45dd2700941ab75661b773680bdd46aaf1</id>
<content type='text'>
This requires recovering the pointer of the allocation, which could be done by adding up neighbor lengths, but the simpler way is to stop NULLing it out in the first place and instead mark an allocation as freed by the client by setting the lowest bit of the length (which is always zero in a valid length).
</content>
</entry>
<entry>
<title>Fix inconsistent supervisor heap.</title>
<updated>2020-10-02T21:03:21+00:00</updated>
<author>
<name>Christian Walther</name>
<email>cwalther@gmx.ch</email>
</author>
<published>2020-09-28T20:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d6d02c67d2bcacaa02499930aabd76365797b108'/>
<id>urn:sha1:d6d02c67d2bcacaa02499930aabd76365797b108</id>
<content type='text'>
When allocations were freed in a different order from the reverse of how they were allocated (leaving holes), the heap would get into an inconsistent state, eventually resulting in crashes.

free_memory() relies on having allocations in order, but allocate_memory() did not guarantee that: It reused the first allocation with a NULL ptr without ensuring that it was between low_address and high_address. When it belongs to a hole in the allocated memory, such an allocation is not really free for reuse, because free_memory() still needs its length.

Instead, explicitly mark allocations available for reuse with a special (invalid) value in the length field. Only allocations that lie between low_address and high_address are marked that way.
</content>
</entry>
<entry>
<title>Merge pull request #3469 from jepler/noreturn</title>
<updated>2020-10-01T18:18:36+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-10-01T18:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d62ac24493abb7aadcf68751997092a1b4141b01'/>
<id>urn:sha1:d62ac24493abb7aadcf68751997092a1b4141b01</id>
<content type='text'>
Add some NORETURN attributes</content>
</entry>
<entry>
<title>Update make translate script</title>
<updated>2020-09-29T05:44:30+00:00</updated>
<author>
<name>microDev</name>
<email>70126934+microDev1@users.noreply.github.com</email>
</author>
<published>2020-09-29T05:44:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4c7d9e3aafbde08399d9839d6cde968f4d1ae005'/>
<id>urn:sha1:4c7d9e3aafbde08399d9839d6cde968f4d1ae005</id>
<content type='text'>
</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>supervisor: stub: make unimplemented safe_mode loop forever</title>
<updated>2020-09-24T21:57:20+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-09-24T21:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6bcbe51f7fcfaca6ee3ee40b4ce64fd791725e8f'/>
<id>urn:sha1:6bcbe51f7fcfaca6ee3ee40b4ce64fd791725e8f</id>
<content type='text'>
</content>
</entry>
</feed>
