Skip to content

Update to 3.6? #14

Open
Open
@chrysophylax

Description

@chrysophylax

Hi!

I'd be willing to test out updated versions of ulisp for stm32f10xxx and give feedback if that's what's needed to get it on feature parity basis. I started doing some merges based on ulisp/ulisp-arm up to 3.6 but I'm editing a bit in the blind.

(PS. I've also finally finished writing a tiny C library that exposes saving/erasing arbitrary flash pages, the new version of saveimage that uses FlashWrite32 should work perfectly with it - so if you want >1023 bytes, it's doable! I'd just like to write some unit tests first before releasing.)

It basically does an opinionated reimplementation of the ST32 Arduino core's flash handling but exposes a slightly more flexible API regarding which 1K page you want to write to (and what size that page has - the new bluepills from WeAct have 2K pages and up to 3072K flash).

For saving, ideally, you start at page 127 and if the imagesize>1K, fill the pages in reverse (127 -> 126 -> 125 -> 124) to avoid conflicting with the Arduino code.

	bool            flash_buffer_fill(const uint8_t page);
	bool            flash_buffer_flush(const uint8_t page);
  const uint32_t*       flash_buffer_handle();
  const uint32_t        flash_buffer_size();
	uint32_t        flash_read_word(const uint8_t pos);
	bool            flash_write_word(const uint8_t pos, const uint32_t value);

If it's possible to up the base ulisp to 3.6, I'll commit to writing the FlashWrite32 ifdefs and the page handling logic.

Related to #12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions