Skip to content

nrf5x: Add nice!nano board#963

Open
kotokrad wants to merge 2 commits into
ZigEmbeddedGroup:mainfrom
kotokrad:nrf5x-board-nicenano
Open

nrf5x: Add nice!nano board#963
kotokrad wants to merge 2 commits into
ZigEmbeddedGroup:mainfrom
kotokrad:nrf5x-board-nicenano

Conversation

@kotokrad

Copy link
Copy Markdown
  • Add nice!nano board

Tested on an original nice!nano and a "promicro nrf52840" clone.

But this board is shipped with Adafruit UF2 bootloader which supports SoftDevice, so the flashing offsets are different.
Does it make sense to add it separately from #921?

Comment thread port/nordic/nrf5x/build.zig Outdated
Comment on lines +207 to +208
.{ .tag = .flash, .offset = 0x00026000, .length = 0x100000 - 0x26000, .access = .rx },
.{ .tag = .ram, .offset = 0x20002800, .length = 0x40000 - 0x2800, .access = .rwx },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you getting these? This is your attempts to not trample the uf2 bootloader? Not sure if we'd want to add a separate target for if/when we want to flash directly. Is the ram allocation just for the softdevice? Does your uf2 bootloader fill that up?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the ram offset was from my attempts to make it work. The 0x2800 is from #921 - this is ram reserved for softdevice. Now I discovered that for disabled softdevice it should start at 0x20000008 - MBR reserves 8 bytes for interrupt forwarding.
(Also with cpu.ram_vector_table = true it's not needed, interrupts work with ram starting at 0x20000000).

As for flash, 0x0000-0x1000 is MBR, then everything until 0x00026000 is reserved for softdevice (S140 6.1.1 in this case, different for other versions). Writing there breaks everything.

Many popular boards use this bootloader, I think there should be support for building uf2 for it without flashing actual softdevice binaries and allocating ram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants