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

mspdebug with generic USB-UART bridge to program MSP420G2553 #101

Open
lorforlinux opened this issue Jan 13, 2021 · 8 comments
Open

mspdebug with generic USB-UART bridge to program MSP420G2553 #101

lorforlinux opened this issue Jan 13, 2021 · 8 comments

Comments

@lorforlinux
Copy link

Hi, I was working to port BSLDemo2.exe to Linux but facing some problems.

I was wondering if it's possible to use the mspdebug tool with the generic USB-UART bridges like CP2102, CH340, PL2303, and FT232R to program MSP430G2553?

@dlbeer
Copy link
Owner

dlbeer commented Jan 13, 2021 via email

@lorforlinux
Copy link
Author

Hey @dlbeer, Thank you for the info. I got access to MSP430G2553 with FT232RL using mspdebug rom-bsl -d /dev/ttyUSB0 and I am able to program it with the prog command in the mspdebug console. Now, I want to program the chip with file name within the command itself. I am not able to figure out how to send the file in the command itself. I tried doing mspdebug rom-bsl -d /dev/ttyUSB0 blinky.txt and multiple other variations but it's not working, please let me know how to achieve this functionality.

I can not express how happy I am after seeing the mspdebug console, I worked so hard to reinvent the wheel and ignored this wonderful car you made. You and all the mspdebug contributors are awesome, thank you so much for this wonderful tool.

@dlbeer
Copy link
Owner

dlbeer commented Jan 13, 2021 via email

@lorforlinux
Copy link
Author

Thank you so much @dlbeer, It worked!

@lorforlinux
Copy link
Author

Hi @dlbeer, do we have an executable release of the mspdebug for windows?
I am not able to compile it, getting these errors:

process_begin: CreateProcess(NULL, pkg-config --cflags libusb, ...) failed.
Makefile:53: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, pkg-config --libs libusb, ...) failed.
Makefile:54: pipe: Bad file descriptor
cc  -DUSE_READLINE  -O1 -Wall -Wno-char-subscripts -ggdb -I. -Isimio -Iformats -Itransport -Idrivers -Iutil -Iui -DLIB_DIR=\"/usr/local/lib/\" -D__Windows__ -DNO_SHELLCMD -o util/btree.o -c util/btree.c
process_begin: CreateProcess(NULL, cc -DUSE_READLINE -O1 -Wall -Wno-char-subscripts -ggdb -I. -Isimio -Iformats -Itransport -Idrivers -Iutil -Iui -DLIB_DIR=\"/usr/local/lib/\" -D__Windows__ -DNO_SHELLCMD -o util/btree.o -c util/btree.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:241: util/btree.o] Error 2

I followed the steps provided here.

@dlbeer
Copy link
Owner

dlbeer commented Jan 14, 2021 via email

@lorforlinux
Copy link
Author

Thanks, @dlbeer for the help 👍
I did the following to compile it on windows,

This is what we have now,

CC ?= gcc
....
....
	ifneq (, $findstring(MINGW, $(UNAME_S)))
		PORTS_CFLAGS := $(shell pkg-config --cflags libusb)
		PORTS_LDFLAGS := $(shell pkg-config --libs libusb)
		RM = rm -rf
	endif
....
....

I replaced it with this,

CC = gcc # removed ?
....
....
	ifneq (, $findstring(MINGW, $(UNAME_S)))
		PORTS_CFLAGS := $(pkg-config --cflags libusb) # removed shell
		PORTS_LDFLAGS := $(pkg-config --libs libusb) # removed shell
		RM = rm -rf
	endif
....
....

for the execution I copied some dll file from energia's mspdebug folder and some as described here and it worked!

@lorforlinux
Copy link
Author

I have created a new flashing tool called msptool for flashing MSP430G2xx3 using your awesome tool.
This allows us to create an Arduino-like board based on the famous MSP430G2553 with Energia support!

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

No branches or pull requests

2 participants