-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nRF91 family improvements #1578
Conversation
7403d90
to
9f7f3a2
Compare
Thanks for the improvements. 😄 I've been on holiday but will be back tomorrow and will start reviewing in earnest. |
Do you know if the builtin algos can be automatically applied to the nrf9160_xxaa target? |
You mean the CMSIS-Pack based What is the reason for overriding the pack algos? Is it to fix issues, or add additional algos? In any case, it should be possible by modifying the memory map. There probably should be a family subclass that is specifically used for pack-based targets (via the family class regex table) and which performs the memory map modifications. Still, this feels a bit hacky. There are also concerns about the pack possibly having newer algo versions than pyocd. However, inserting an additional memory region+algo should be safe (if that region is not already present, of course). |
The algorithm here is modified slightly to work with pyocd. Since the UICR region is not present in the pack-based target, we could add it as an additional memory region there. How would I do that? |
I see. To add the region, you can just call Similarly, you can modify the memory map at this point to override the flash algo. (The ability to modify memory region attributes after creation is a recent change. If you run into trouble, just let me know!) |
@flit Thanks! Just made the change to automatically add the UICR region if not present already. |
Btw, I meant to mention earlier, it would be nice to add a command to perform the modem firmware update since you already have the code. Someone was asking how to do this with pyocd on the Nordic forum. Doesn't have to be in this PR, though. To do this, create a command class like those in Starting from something like this: class nRF91ModemFirmwareUpdateCommand(CommandBase):
INFO = {
'names': ['nrf91-update-modem-fw'],
'group': 'nrf91', # This is the group named passed to `.add_command_group()`.
'category': 'nrf', # Could also be 'nrf91'? This is the category the command will be grouped under in help.
'nargs': 1, # Set based on usage
'usage': "FILL ME IN",
'help': "Update modem firmware for an nRF91 target.",
'extra_help': "",
}
def parse(self, args):
pass
def execute(self):
pass Then override def add_target_command_groups(self, command_set: CommandSet) -> None:
command_set.add_command_group('nrf91') As long as the command class is in a module loaded before |
Signed-off-by: Maximilian Deubel <[email protected]>
Signed-off-by: Maximilian Deubel <[email protected]>
Signed-off-by: Maximilian Deubel <[email protected]>
Signed-off-by: Maximilian Deubel <[email protected]>
That's great! I just added a command like you described. |
Awesome! 😄 |
This patch adds the following improvements to nRF91 support: