Pull Requests - bus pirate 5 firmware

New Pull Request: Mode Quality of Life improvements
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

Use array initializers to ensure that each mode’s data is in the index to which its enum corresponds. This can help catch errors since the changes are across multiple files.

Also update the mode enumeration to have a common BP_MODE_ prefix. It would be better is C supported scoped enumerations, but this is the standard practice to reduce the chance of name collisions in the global namespace.

typedef the bytecode structure so don’t need to keep typing struct _bytecode everywhere.

And mark the modes as const. I had hoped the compiler would place this into a ROM section directly, and thus save a few extra bytes of RAM, but … unfortunately this is not the case. Still, it is good to mark things as const whenever possible.

Created by: henrygab

New Pull Request: Minor bugfixes
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

Only one change that has potential to modify resulting code:

  • Mark a global variable modified in ISR as volatile.

Otherwise, these are compile-time only changes with no impact on resulting binary:

  • Static assertion added
  • Framework to enable readme to be up to 511 bytes

If you’ve not been bitten by the lack of volatile, consider yourself lucky. Suffice it to say that the compiler’s optimizer needs to know that it really, really should not optimize some things.

Created by: henrygab

New Pull Request: Merged the multiple small PRs so you don’t have to merge / rebase
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

Replaces the following PRs:

  • #66
  • #67
  • #68
  • #69

Created by: henrygab

Great updates, especially the inner-core messaging stuff.

2 Likes

New Pull Request: Enable 2Gbit rev10 board firmware
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

  • Add new target in CMakefiles.txt
  • Change NAND terms to use ERASE_BLOCK instead of simply BLOCK
  • Use #define to select between two flash chips for firmware
  • Pass row_address_t to additional nand functions to support multi-plane
  • Fix for cross-plane copy (less efficient, but required until command found that copies from one plane’s cache register to the other plane’s cache register…)

( Replaces PR #65 )

Created by: henrygab

2 Likes

New Pull Request: Single firmware for both 1Gbit and 2Gbit Rev10 boards
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

CMakeLists.txt

  • Remove newly added 2Gbit firmware type

nand/nand_ftl_diskio.c

  • Allow SPI NAND initialization to populate the dhara parameters dynamically

nand/spi_nand.c

  • spi_nand_init() now fills in the struct dhara_nand
  • static global page buffer is now maximum size for all supported nand chips (64 bytes extra RAM on 1Gbit Rev10) … renamed buffer to catch and replace all uses and replace any sizeof(buffer) style length with a length calculated based on detected NAND chip.
  • Track pointer to detected chip in global variable g_Actual_Nand_Device
  • Function read_id() now fills the nand_identity_t structure, does not validate the data (now done in spi_nand_init())
  • Converted some #define symbols into macros
  • use void * instead of uint8_t * when buffer type is variable type/size
  • in spi_nand.c, rename static reset() function as spi_nand_reset() to reduce likelihood of clashing with other functions.

Other random bits

  • Rename SPI_NAND_PAGES_PER_BLOCKSPI_NAND_PAGES_PER_ERASE_BLOCK
  • minor formatting tweaks

Created by: henrygab

1 Like

New Pull Request: RGB - Fix a bunch of bugs
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

Highlights:

  • Externally, pixel color is always RGB order, stored in uint32_t.
  • Internally, pixel color uses the CPIXEL_COLOR_RGB format.
  • Moved brightness adjustment to single consolidated location (update of pixels).
  • Fixed name of configuration file’s brightness setting.
  • Prevented invalid values from being set in system configuration.
  • Config file stores pixel color as hex string (“0x00RRGGBB”). This allows setting any color by editing the config file, even if not listed in the UI.

There’s also a number of bugfixes, off-by-one adjustments, formatting updates, and more comments documenting the code’s intended behavior.

Created by: henrygab

2 Likes

New Pull Request: RGB: only need six hex digits printed
henrygab/BusPirate5-firmwareDangerousPrototypes/BusPirate5-firmware

Sorry, one more minor update.

Created by: henrygab