Search found 12 matches

by hjf
Sat Mar 12, 2016 1:44 pm
Forum: General Discussion and Questions
Topic: flash read errors?
Replies: 7
Views: 5685

Re: flash read errors?

Thanks for the answers. I'll be tryng the suggestions. I'm trying to understand the problem. Is it that there are two devices mounting a partition at the same time? If so, the fix would probably be to use MTP mode instead of USB mass storage. This is how my phone does it. To the end user MTP is basi...
by hjf
Sat Mar 12, 2016 5:14 am
Forum: General Discussion and Questions
Topic: flash read errors?
Replies: 7
Views: 5685

Re: flash read errors?

I thought it was possible to do that? How should I test my code? Is it possible to disable USB mass storage for testing?
by hjf
Sat Mar 12, 2016 3:05 am
Forum: General Discussion and Questions
Topic: flash read errors?
Replies: 7
Views: 5685

flash read errors?

I'm having strange issues with an STM32F4 Discovery board. Microphython is installed and works, the device appears in Windows and I can write to it. But, for some reason, I get odd "syntax errors" where there is no syntax error. I have to reboot the board with Ctrl-D several times and then it will w...
by hjf
Tue Mar 08, 2016 11:12 pm
Forum: Other Boards
Topic: Debugging with GDB/Eclipse?
Replies: 2
Views: 4479

Re: Debugging with GDB/Eclipse?

Yes, that's correct. Anyway, the problem was that I was using "gdb", not "arm-none-eabi-gdb"... :roll:
by hjf
Tue Mar 08, 2016 11:11 am
Forum: Other Boards
Topic: Debugging with GDB/Eclipse?
Replies: 2
Views: 4479

Debugging with GDB/Eclipse?

I set everything up for debugging STM32 targets with Eclipse (Onboard ST-LINK/V2 on a F4DISCOVERY, st-util GDB target, gdb for ARM, and Eclipse plugins). A simple blinking led works and lets me set breakpoints and step through functions. Then I proceeded to configure an Eclipse project for MicroPyth...
by hjf
Sun Mar 06, 2016 3:06 pm
Forum: General Discussion and Questions
Topic: DHCP client in Python?
Replies: 2
Views: 5520

Re: DHCP client in Python?

Well, stmhal uses a different socket than the one in micropython-lib it seems. It's not a library, but it's built in. It's a wrapper to C functions. I'm following the example here: http://docs.micropython.org/en/latest/library/network.html If I do >>> addr = socket.getaddrinfo('micropython.org', 80)...
by hjf
Sun Mar 06, 2016 12:47 am
Forum: General Discussion and Questions
Topic: DHCP client in Python?
Replies: 2
Views: 5520

DHCP client in Python?

Recently I fixed the support for wiznet 5500 ( https://github.com/micropython/micropython/pull/1859 ). ifconfig() works and I can open a TCP socket and fetch HTTP data. I don't see any references to DHCP in Micropython (at least not with the Wiznet driver) so I thought of writing a DHCP client. Here...
by hjf
Fri Mar 04, 2016 1:15 am
Forum: General Discussion and Questions
Topic: ROM modules?
Replies: 1
Views: 2287

ROM modules?

Is it possible to add my own Python modules to "ROM"? As in, I don't want them to be in the SD Card area, or to be writeable by the user. I want to provide a simple interface for a project, where this module will handle the "low level" functionality (setting up timers, keep DHCP working, etc) while ...
by hjf
Mon Feb 29, 2016 10:52 am
Forum: General Discussion and Questions
Topic: Using the C API?
Replies: 18
Views: 19427

Re: Using the C API?

You're missing the parenthesis when you're trying to call the call_callback function Ah yes. Also known as the "don't try to program when it's 1AM and your eyes can't even focus on the screen" But now I get this: >>> c_sample.call_callback() Traceback (most recent call last): File "<stdin>", line 1...
by hjf
Mon Feb 29, 2016 3:37 am
Forum: General Discussion and Questions
Topic: Using the C API?
Replies: 18
Views: 19427

Re: Using the C API?

I tried to base on your code to make a small function but I just can't seem to make it work. I redefined your C function as: STATIC mp_obj_t c_sample_call_callback(void) { vstr_t vstr; vstr_init_fixed_buf(&vstr, 32, "some_string"); mp_obj_t obj = mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); retu...