-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Accessing compilation errors #284
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
Comments
So, if you are using an actual pyboard (or a discovery board, or like me rolled your own) you will usually get a compile error show up on the USB console. If you use my brother's usb-ser-mon, it automagically re-connects as soon as the console is available (after flashing), so you won't miss anything.
----- Original Message -----
|
There's no such known inability (with #282 applied which cover last "obscure" bit). If you have issues with imports, please submit a ticket with a testcase which shows the issue.
Everyone would have different opinion for this one, so here's mine: you should do all porting, debugging, testing, etc. using "unix" port. For "unix" port, such questions don't hold - you get complete (with tracebacks) error reporting in split seconds. For hardware access, you should have appropriate mock/semihosting modules. Once you have testsuite which does ~100% code coverage, you move to device, where it will just work. |
If there is an error that throws an exception, then it should print out on the USB console. You don't have to be connected to the console when the error happens, it should buffer the output and you will see it when you connect (eg picocom /dev/ttyACM0). |
I have tried both picocom and minicom and have yet to see any compilation error printed to the console. I prefer minicom as it doesn't drop the connection during a script upload and automatically reconnects after I hit the reset button on my STM32F407 discovery board. Based on my little This works 👍 print(counter) And this doesn't work 👎 print counter However I don't see any compilation error in the second case. |
Using my brother's usb-ser-mon, I get the following: USB Serial device with vendor 'STMicroelectronics' serial '00000000050C' connected @/dev/ttyACM0 My test.py program has the following line (after a blank line): print "Hello" This is running on my custom STM32F405 based MicroPython board. What are you running on? You can't use normal terminal emulators - they don't connect fast enough when the board is powered or reset. Clone this repo: https://github.com/dhylands/usb-ser-mon Read and follow the readme, and then see what happens.
----- Original Message -----
|
Yes, I'm aware of that. I was trying to force a syntax error, to show that the compile errors show up on the USB console, which is what the point of this issue is... ----- Original Message -----
|
@JonHylands Yeah, sorry - I replied having seen the bug e-mail, without spending the time to read the rest of the bug. My bad - I deleted the comment immediately afterwards, but presumably notifications still went through. |
I think that exceptions which occur as part of boot.py or main.py might not Dave Hylands
|
On my board, I've got the following in my boot.py: print("Executing uCee's boot.py") So test.py is the equivalent of main.py in this case...
----- Original Message -----
|
@royemmerich: Did suggestions provided help? Can we close this ticket? |
Making use of @dhylands usb-ser-mon python serial app I can now see the compilation errors after copying my file to the However after @dpgeorge's comment:
which doesn't seem to work, then I would consider usb-ser-mon a (rather good) workaround and this still an unfixed bug. |
The USB serial console doesn't seem to buffer characters. Using usb-ser-mon connected to a UART (and main.c modified appropriately), I haven't yet established if the fault is in usb-ser-mon or in the Dave Hylands On Sun, Feb 23, 2014 at 1:57 PM, Roy Emmerich notifications@github.comwrote:
|
I assume this was resolved/clarified, and there were further changes to console code to make other concerns obsolete. If issues still hold, please reopen/resubmit. |
So I am thrashing away trying to get MODBUS communication working...and it is not...yet :( I have one BIG script with all of the modbus_tk python library in it to compensate for the inability to import other python modules.
I also added some LED blinking to see if things are actually working. Initially they didn't blink so I commented out all the MODBUS related code (numerous classes, function definitions, etc.), re-uploaded the script and they started to blink again. Eventually through trial and error I figured out it was this piece of code which was causing things to break (specifically line 3):
This got me thinking:
How is one supposed to know when there is a compilation error after uploading a script and what the error is?
P.S. Until importing is working and the python standard libraries are better represented it is looking more feasible to implement the MODBUS stuff in C and call it from python. I'll give that a bash over the next few days.
The text was updated successfully, but these errors were encountered: