Skip to content

makefiles/tools/uniflash.inc.mk: add a common configuration for using UniFlash#11198

Merged
smlng merged 5 commits intoRIOT-OS:masterfrom
cladmi:pr/make/uniflash/updates
Mar 18, 2019
Merged

makefiles/tools/uniflash.inc.mk: add a common configuration for using UniFlash#11198
smlng merged 5 commits intoRIOT-OS:masterfrom
cladmi:pr/make/uniflash/updates

Conversation

@cladmi
Copy link
Copy Markdown
Contributor

@cladmi cladmi commented Mar 15, 2019

Contribution description

This pull request:

  • adds a common uniflash flasher
  • uses it in the cc2650xx boards.
  • update the RESET configuration to handle UniFlash version >= 4.4.0 that had a different reset directory. In case it is not found, I used 'xds110reset' to be sure to have a value.
  • use FLASHFILE as file to flash.

I tested with cc2650-launchpad with the versions:

  • uniflash_sl.4.1.1329.run
  • uniflash_sl.4.3.0.1802.run
  • uniflash_sl.4.4.0.2009.run
  • uniflash_sl.4.5.0.2056.run
  • uniflash_sl.4.6.0.2176.run

The version uniflash.4.0.986.run did not work, even on master, as there is no xds110reset

Testing procedure

Refactoring

An easier task without board could be to review commit by commit too.
The 3 first commits are only putting in common and can easily be checked by comparing the files.
The same for the FLASHFILE one.

Testing the reset handling

Either you review the code handling, or you test each versions (guess what I did…)

Detect the new path for reset

http://downloads.ti.com/ccs/esd/uniflash/uniflash_sl.4.4.0.2009.run?tracked=1

UNIFLASH_PATH=${HOME}/ti/uniflash_4.4.0 BOARD=cc2650-launchpad make --no-print-directory -C tests/shell/ reset
/home/harter/ti/uniflash_4.4.0/simplelink/imagecreator/bin/xds110reset

Detect the old path for reset (same as in master)

http://downloads.ti.com/ccs/esd/uniflash/uniflash_sl.4.3.0.1802.run?tracked=1

UNIFLASH_PATH=${HOME}/ti/uniflash_4.3.0 BOARD=cc2650-launchpad make --no-print-directory -C tests/shell/ reset
/home/harter/ti/uniflash_4.3.0/simplelink/gen2/bin/xds110reset

Detect the backup to xds110reset with this version
http://downloads.ti.com/ccs/esd/uniflash/uniflash.4.0.986.run?tracked=1

# This should fail as there is not `xds110reset` in uniflash and i the path
UNIFLASH_PATH=${HOME}/ti/uniflash_4.0 BOARD=cc2650-launchpad make --no-print-directory -C tests/shell/ reset
Reset program xds110reset is required but not found in PATH.  Aborting.
/home/harter/work/git/RIOT/tests/shell/../../Makefile.include:569: recipe for target 'reset' failed

Flashing still works:

UNIFLASH_PATH=${HOME}/ti/uniflash_4.6.0/ BOARD=cc2650-launchpad make --no-print-directory -C tests/shell/ flash test
# Test should succeed, do it with any test

Note

On my machine and the tested version, DEBUGSERVER file does not exist and was not working in master. I did not update this part yet.

Issues/PRs references

Part of #8838

Running the tests on cc2560-launchpad board given by @MrKevinWeiss for #10870

cladmi added 5 commits March 15, 2019 15:39
Make it more similar to cc2650-launchpad
Put the uniflash flasher in common.
In UniFlash 4.4.0 the directory where 'xds110reset' is changed.
Try to use the newest one available. If none is found in UNIFLASH_PATH,
try to use one from the PATH to be sure to have a value.

./uniflash_4.1/simplelink/gen2/bin/xds110reset
./uniflash_4.3.0/simplelink/gen2/bin/xds110reset
./uniflash_4.4.0/simplelink/imagecreator/bin/xds110reset
./uniflash_4.5.0/simplelink/imagecreator/bin/xds110reset
Update to use FLASHFILE as file to be flashed on the board.
@cladmi cladmi added Area: build system Area: Build system Area: tools Area: Supplementary tools labels Mar 15, 2019
@cladmi cladmi added this to the Release 2019.04 milestone Mar 15, 2019
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 15, 2019

I can remove all the export as they are not required if a reviewer want to test this as well.
I did not wanted to slow it down to much.

@cladmi cladmi requested review from MrKevinWeiss and smlng March 15, 2019 15:48
@smlng smlng added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Mar 16, 2019
Copy link
Copy Markdown
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

looks very good, nice consolidation ... however I want to test this with the 2650stk too

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

I tested on the cc2650-launchpad and it is good. Do we have access to the 2650stk?

Copy link
Copy Markdown
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

works with cc2650stk and uniflash 4.1, too

@smlng smlng added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 18, 2019
@smlng smlng merged commit 29f7cd2 into RIOT-OS:master Mar 18, 2019
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 20, 2019

Thank you for the review.

@cladmi cladmi deleted the pr/make/uniflash/updates branch March 20, 2019 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants