Search found 2754 matches

by jimmo
Fri Dec 27, 2019 12:51 am
Forum: micro:bit boards
Topic: [SOLVED] Can't obtain repl over USB using screen on micro:bit
Replies: 10
Views: 9831

Re: Can't obtain repl over USB using screen on micro:bit

As already suggested, sounds like a program might be running, so Ctrl-C is a good start. After connecting the microbit though, try running `dmesg` and see what you see. Ensure that it's the correct /dev/ttyACMX device being registered. Do you also get the virtual disk drive (should look like a FAT v...
by jimmo
Fri Dec 27, 2019 12:27 am
Forum: General Discussion and Questions
Topic: Import silently Fails
Replies: 10
Views: 6711

Re: Import silently Fails

I'm not aware of a way to unload a module in MicroPython, other than to soft-reset (via Ctrl-D at the REPL) del sys.modules['mymodule'] Neat! I knew that worked in CPython but didn't know MicroPython supported it. Thanks!! :) (Should have checked -- sys.modules is MP_STATE_VM(mp_loaded_modules_dict...
by jimmo
Thu Dec 26, 2019 2:50 am
Forum: General Discussion and Questions
Topic: Import silently Fails
Replies: 10
Views: 6711

Re: Import silently Fails

hi, Can you provide more information about how you're copying and running the code. On the REPL, importing a module that has errors (of any type) will raise an exception. Furthermore, the module will never be imported partially. I suspect the issue here might be that "del module" doesn't do perhaps ...
by jimmo
Tue Dec 24, 2019 3:41 am
Forum: General Discussion and Questions
Topic: Build Secrets
Replies: 14
Views: 7701

Re: Build Secrets

Definitely prefer the second (i.e. extend the port manifest, rather than duplicating it).
by jimmo
Tue Dec 24, 2019 3:40 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 3708

Re: No File System After Build

How can I add a new path to the build so that I can also use it in related files line PORT_DIR I think it sounds like you want to add a new variable? Not currently supported. But any path is relative to the current python file, so for the most part just using relative paths should work. However if ...
by jimmo
Tue Dec 24, 2019 2:29 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 3708

Re: No File System After Build

Look at for example how the tinypico manifest (esp32/boards/TINYPICO/manifest.py) inherits from the base one. (The ability to inherit/extend manifests was one of the main reasons for manifests -- on ports where you need to extend the set of frozen modules rather than just provide your own, the singl...
by jimmo
Tue Dec 24, 2019 2:25 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 3708

Re: No File System After Build

The esp32 port uses python code to initialise the block device and filesystem (this is in _boot.py and other code in esp32/modules). Is it possible you're setting FROZEN_MANIFEST (or otherwise override the module freezing process) in a way that's preventing these modules from being frozen? (Note thi...
by jimmo
Tue Dec 24, 2019 12:55 am
Forum: General Discussion and Questions
Topic: get more free RAM...
Replies: 44
Views: 27215

Re: get more free RAM...

Thinking about this again I reckon the really underutilized statement in an embedded environment would be del. Yes. For the issue described here, "del a" (where "a" is a function local) is equivalent, and will be marginally faster and be represented in less bytecode. (Internally it NULLs the elemen...
by jimmo
Mon Dec 23, 2019 12:56 pm
Forum: General Discussion and Questions
Topic: Build Secrets
Replies: 14
Views: 7701

Re: Build Secrets

Need "include Makefile" at the end.

Also the whole idea is to move everything from the command line into the .mk file.
by jimmo
Mon Dec 23, 2019 11:58 am
Forum: General Discussion and Questions
Topic: Build Secrets
Replies: 14
Views: 7701

Re: Build Secrets

devnull wrote:
Mon Dec 23, 2019 11:38 am
so it does not matter what the filename is as long as it is sourced using -f in the make command ?
Yes... It does not matter. Using ".mk" is a convention, but you can call it whatever you like.