Skip to content
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

Update BOSSA to 1.9.1 #234

Closed
nzmichaelh opened this issue Jun 28, 2020 · 15 comments
Closed

Update BOSSA to 1.9.1 #234

nzmichaelh opened this issue Jun 28, 2020 · 15 comments
Assignees

Comments

@nzmichaelh
Copy link

b20b0aa was the previous attempt. Rolling forward requires changes to the Zephyr side west command. Once that has landed, this bug will track updating the SDK.

@stephanosio
Copy link
Member

@galak I opened a PR that brings back the old commit: #235

There should be no problem upgrading to the latest version of BOSSA since the offset param is now handled by zephyrproject-rtos/zephyr#26510.

@nzmichaelh
Copy link
Author

Could we pick up shumatech/BOSSA/pull/78 as well? It fixes a re-enumeration issue when resetting.

@nzmichaelh
Copy link
Author

Oh, and this will add support for Windows machines as we can drop the stty reset trigger and use BOSSA's built-in reset support.

@galak
Copy link
Contributor

galak commented Jul 10, 2020

@nzmichaelh is there a fix for shumatech/BOSSA#96 ? That was why we went back to 1.7.

@nzmichaelh
Copy link
Author

Hi @galak I'm not sure the one you bisected to is the cause or, at least, the only one.

schumatech/BOSSA@dbdd088909c57bdf9aee191720bf6c6159217e22 made a breaking change. In 1.7 and 1.8 it would automatically detect the bootloader and add the offset, while in 1.9 you need to explicitly supply the --offset. The PR that I sent recently to runners/bossa.py now detects the flag and adds it automatically based on the DeviceTree partitions.

I've tested on my machine with the Ubuntu supplied 1.9.1 and it works fine. Any thoughts on how else we can test?

@nzmichaelh
Copy link
Author

Also, if we go ahead, could we pick up the current HEAD schumatech/BOSSA@3532de82efd28fadbabc2b258d84dddf14298107 ? It fixes a race in re-enumeration which we'll otherwise have to work-around in runners/bossa.py.

@galak
Copy link
Contributor

galak commented Jul 10, 2020

I think there was some issue flashing the Arduino 101 if I remember correctly. @nashif might also vaguely remember this.

@nashif
Copy link
Member

nashif commented Jul 10, 2020

I think there was some issue flashing the Arduino 101 if I remember correctly. @nashif might also vaguely remember this.

not 101, this was about Arduino Due I think :)

@galak
Copy link
Contributor

galak commented Jul 13, 2020

@nzmichaelh do you know what the --offset should be for arduino_due. Trying to test that out w/top of tree BOSSA to make sure that works ok.

@galak
Copy link
Contributor

galak commented Jul 13, 2020

@nzmichaelh a few different things:

  1. looks like main line of BOSSA has changed exits code for --help to return 0, so we need west runner to handle that (shumatech/BOSSA@f83f741)
  2. When I try to run with bossa 1.9.1 and flash arduino_due I get:
/home/galak/git/BOSSA/bin/bossac -p /dev/ttyACM0 -R -e -w -v -b /home/galak/git/zephyr/samples/hello_world/build/zephyr/zephyr.bin -o 524288
Erase flash

Done in 0.000 seconds

Flash offset is invalid

@nzmichaelh
Copy link
Author

re: exit code, I'll fix this.

re: offset, I read up on the Due and it has a separate ATMEGA as an onboard programmer, and the flash is at offset 0x80000 which matches the -o 524288. I'll investigate further.

Was this against an actual Due, or some other Arduino? I ask as if BOSSA detects the memory, then +512k would truly be invalid as most SAMDs have 256k of flash from address 0.

@nzmichaelh
Copy link
Author

(and you can see what BOSSA detected by adding a -i to the command line)

@galak
Copy link
Contributor

galak commented Jul 13, 2020

re: exit code, I'll fix this.

re: offset, I read up on the Due and it has a separate ATMEGA as an onboard programmer, and the flash is at offset 0x80000 which matches the -o 524288. I'll investigate further.

Was this against an actual Due, or some other Arduino? I ask as if BOSSA detects the memory, then +512k would truly be invalid as most SAMDs have 256k of flash from address 0.

This was against an actual Due board.

[galak@lava2 ~]$ /home/galak/git/BOSSA/bin/bossac -p /dev/ttyACM0 -i
Device       : ATSAM3X8
Version      : v1.1 Dec 15 2010 19:25:04
Address      : 0x80000
Pages        : 2048
Page Size    : 256 bytes
Total Size   : 512KB
Planes       : 2
Lock Regions : 32
Locked       : none
Security     : false
Boot Flash   : false

@nzmichaelh
Copy link
Author

Thanks. --offset might be the offset into the flash instead of the offset into the address space. I'll investigate and send two PRs:

  • Fix the --help processing on the git version of BOSSA
  • Investigate --offset and update to offset-in-flash

Only the SAM3X is affected by this. All other BOSSA based boards in Zephyr have flash that start at zero

@galak
Copy link
Contributor

galak commented Jul 16, 2020

Handled by commit e097bbd

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 a pull request may close this issue.

4 participants