dlbeer / mspdebug

Debugging tool for MSP430 MCUs
GNU General Public License v2.0
184 stars 80 forks source link

generalize x86-specific trap instruction #112

Closed chrissphinx closed 2 years ago

chrissphinx commented 2 years ago

This is a minor fix to the source to enable successful compilation on ARM-based machines. Using a patched libmsp430.so, I have tested that this works.

However, in my experience, mspdebug is only able to connect with the board a single time before it is unable to reconnect without unplugging the board and plugging it back in. This was tested under Parallels on Ubuntu for ARM running on an M1 Mac. Considering the libmsp430.so was also patched, it seems hard to tell where the problem lies, but during re-connection attempt, it just times out. There's no signs of a reset attempt from the board (no lights blink, current firmware doesn't pause visibly at all).

I don't know if this fix is a regression on x86-based machines, I did not test that (yet).

dlbeer commented 2 years ago

On Sat, Jan 22, 2022 at 07:46:52PM -0800, chrissphinx wrote:

This is a minor fix to the source to enable successful compilation on ARM-based machines. Using a patched libmsp430.so, I have tested that this works.

However, in my experience, mspdebug is only able to connect with the board a single time before it is unable to reconnect without unplugging the board and plugging it back in. This was tested under Parallels on Ubuntu for ARM running on an M1 Mac. Considering the libmsp430.so was also patched, it seems hard to tell where the problem lies, but during re-connection attempt, it just times out. There's no signs of a reset attempt from the board (no lights blink, current firmware doesn't pause visibly at all).

I don't know if this fix is a regression on x86-based machines, I did not test that (yet). You can view, comment on, or merge this pull request online at:

It looks to me like this is a leftover from debugging that shouldn't be there at all.

If you want to amend the commit to remove the asm line altogether I'll merge it.

-- Daniel Beer @.***> http://dlbeer.co.nz/ PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B

chrissphinx commented 2 years ago

Okay, line has been removed 👍

dlbeer commented 2 years ago

On Sun, Jan 23, 2022 at 06:47:21PM -0800, chrissphinx wrote:

Okay, line has been removed 👍

Thanks, but would it be possible to have this as a single commit?

You should be able to crush down what you have and push it through with:

git reset HEAD^
git commit -a --amend

Then you can re-push (you'll likely need -f to force).

-- Daniel Beer @.***> http://dlbeer.co.nz/ PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B

chrissphinx commented 2 years ago

Ah, sorry about that, I was being lazy and doing everything from GitHub UI. :)

I think it's all set now.

dlbeer commented 2 years ago

No worries, thanks!