-
Notifications
You must be signed in to change notification settings - Fork 17
Adding support for WSL #5
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
374a930
0573dd3
152a57c
378478c
14887c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,12 +73,25 @@ flash: all test_softdevice flash_mbr | |
| ifdef ID | ||
| $(Q)printf "w4 $(ID_FLASH_LOCATION), 0x$(ID_SECON) 0x$(ID_FIRST)\n" >> $(BUILDDIR)flash.jlink | ||
| endif | ||
| ifeq ($(USE_BOOTLOADER),1) | ||
| ifeq ($(strip $(grep -q Microsoft /proc/version)),) | ||
| @echo Flashing: $(HEX) | ||
| nrfjprog.exe -f nrf52 --program $(HEX) --sectorerase | ||
| nrfjprog.exe -f nrf52 --reset | ||
| else ifeq ($(USE_BOOTLOADER),1) | ||
| $(Q)printf "loadfile $(MERGED_HEX) \nr\ng\nexit\n" >> $(BUILDDIR)flash.jlink | ||
| else | ||
| $(Q)$(JLINK) $(JLINK_FLAGS) $(BUILDDIR)flash.jlink | ||
| else ifeq ($(USE_BOOTLOADER),0) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also want to leave this line as just an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, the better design might just be to leave the logic that creates the flash.jlink file alone. It shouldn't hurt anything to create that file on windows even if you don't use it. Then you can create one if check that decides if you're windows and uses nrfjprog or else falls back on the existing JLINK infrastructure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fwiw, |
||
| $(Q)printf "loadfile $(HEX) \nr\ng\nexit\n" >> $(BUILDDIR)flash.jlink | ||
| endif | ||
| $(Q)$(JLINK) $(JLINK_FLAGS) $(BUILDDIR)flash.jlink | ||
| endif | ||
|
|
||
|
|
||
| flashWSL: all test_softdevice flash_mbr | ||
ShishirPatil marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| @echo Flashing: $(OUTPUT_DIRECTORY)/toxophilite.hex | ||
ShishirPatil marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $(nrfjprog.exe) -f nrf52 --program $(OUTPUT_DIRECTORY)/toxophilite.hex --sectorerase | ||
| $(NRFPROG) -f nrf52 --reset | ||
|
|
||
|
|
||
|
|
||
| .PHONY: test_softdevice | ||
| test_softdevice: $(BUILDDIR) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,9 @@ This folder contains the GCC build system for the nRF5x platforms. It | |
| originally comes from | ||
| [hlnd/nrf51-pure-gcc-setup](https://github.com/hlnd/nrf51-pure-gcc-setup). | ||
|
|
||
| We develop on Linux. Original files still exist for Windows, but have not been | ||
| tested in some time. Feel free to submit a pull request if you find something | ||
| that doesn't work. | ||
| We develop on Linux. This also works on Windows in either of the following ways: | ||
| 1. Build on WSL (Windows Subsystem for Linux), and `flash` with WSL. | ||
| 2. Build with SES (Segger Embedded Studio) and `flash` with WSL. Note: For this you will have to manually move the `.hex` file generated from SES to `build/` directory. For e.g. `mv blinky/pca10040/s132/ses/Output/Release/Exe/blinky_pca10040_s132.hex blinky/_build/blink_sdk16_blank.hex`. | ||
|
||
|
|
||
| The currently supported SDK versions are: 9, 10, 11 | ||
|
|
||
|
|
@@ -17,8 +17,8 @@ Things to Install | |
| ----------------- | ||
| 1. `gcc-arm-none-eabi`: https://launchpad.net/gcc-arm-embedded | ||
| 2. gdb-arm-none-eabi | ||
| 3. The [jlink tools](https://www.segger.com/jlink-software.html) for linux | ||
| 4. The jlink debuger for linux | ||
| 3. The [jlink tools](https://www.segger.com/jlink-software.html) for linux / windows for WSL | ||
| 4. The jlink debuger for linux [OR] jlink debuger for Windows for WSL/SES | ||
|
|
||
| Usage | ||
| ----- | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.