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
Add downloader selection #2997
Add downloader selection #2997
Conversation
f7e876e
to
d6e729b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@kasjer could you update all other bsp so it use new way? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea. It might also be helpful for 'download.cmd' to exist, for devs using windows?
I just had minor comments, nothing stopping this from going ahead.
hw/bsp/nordic_pca10095_net/bsp.yml
Outdated
@@ -29,7 +29,7 @@ bsp.linkerscript.BOOT_LOADER.OVERWRITE: | |||
- "hw/bsp/nordic_pca10095_net/boot-nrf5340_net.ld" | |||
- "@apache-mynewt-core/hw/mcu/nordic/nrf5340_net/nrf5340_net.ld" | |||
bsp.part2linkerscript: "hw/bsp/nordic_pca10095_net/split-nordic_pca10095_net.ld" | |||
bsp.downloadscript: "hw/bsp/nordic_pca10095_net/nordic_pca10095_net_download.sh" | |||
bsp.downloadscript: "@apache-mynewt-core/hw/scripts/download.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the repo name needed in the location for this BSP for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I will remove it for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
;; | ||
"jlink") | ||
. $CORE_PATH/hw/scripts/jlink.sh | ||
JLINK_DEV=${MYNEWT_VAL_JLINK_TARGET} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we complain if the required variable is not set? The same applies to openocd case.
This might save users some debug time...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, fix on the way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Originally .cmd files were needed on Windows because In short as Windows user I don't see any reason to add .cmd files unless I'm missing something. |
So far (almost) every BSP had its own version of download script. Changing download software specially for ST devices was cumbersome. Lately it was possible to override download script in target but it still is more complicated then just changing syscfg value. This adds common hw/scripts/download.sh file that can use all available options to download image. sh/scripts is converted to package to allow syscfg definitions that can be overriden in BSPs or targets. jlink, openocd, stutil, stm32_programmer_cli and pyocd can be selected. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This change adds support for nrfjprog as an option to flash NRF devices Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This change partial support for ezFlashCLI. It is not possible to flash program header yet so bootloader should not be flash this way (yet). Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This adds explicit support for stm32_programmer_cli. It was possible to use this tool instead of st-flash with environment variable. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
When pyocd is used to flash device is checks if file to flash ends with @<address>. If @ is found in file name it tries to use remaining string as flash address. For mcuboot or other applications that are in mynewt-core or nimble it would lead to pyocd exception since "mcuboot" can't be converted to number. To fix this -a argument that was used to specify load address is removed and (possible) second @ with FLASH_OFFSET is appended to file name for pycd sake Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This removes: - .cmd files that were not need anymore - nucleo_f767zi_download.sh (which is replaced by hw/scripts/download.sh) Values for various download commands are put in syscfg so they don't have to be specified in target when downloader is change to other option. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This switches to common download script that can be used to flash device with nrfjprog and jlink Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
d6e729b
to
1029206
Compare
So far (almost) every BSP had its own version of download script.
Changing download software specially for ST devices was cumbersome.
Lately it was possible to override download script in target but
it still is more complicated then just changing syscfg value.
This adds common hw/scripts/download.sh file that can use all available
options to download image.
sh/scripts is converted to package to allow syscfg definitions that can
be overriden in BSPs or targets.
jlink, openocd, stutil, stm32_programmer_cli and pyocd can be selected.
Two example BSP were converted to common download script to see if it will catch up.