Search found 11 matches
- Mon Jun 10, 2019 9:01 am
- Forum: Programs, Libraries and Tools
- Topic: Compression for uzlib
- Replies: 3
- Views: 4098
Re: Compression for uzlib
Hi tylerkolden, Yes, ended up implementing .tar.gz compatible compression for uzlib + microtar library. I included a simple example into my original post, basically you need to split your input file into a number of data chunks, compress each of them into a separate gzip member and write all the mem...
- Thu Jan 31, 2019 9:29 am
- Forum: Programs, Libraries and Tools
- Topic: Compression for uzlib
- Replies: 3
- Views: 4098
Compression for uzlib
I'm wondering why uzlib module doesn't support compression? Surely, in the current implementation of tgzip example (uzlib ver. 2.9.2) the whole input file should be copied into RAM, but looking at the source code I can't find anything that makes splitting the input file into a number of data chunks ...
- Tue Jan 22, 2019 8:43 am
- Forum: General Discussion and Questions
- Topic: Understanding Fatal Error with respect to STM32
- Replies: 9
- Views: 6540
Re: Understanding Fatal Error with respect to STM32
I would start with capturing your debug UART port output defined @ mp_hal_stdout_tx_strn() and looking for "\nFATAL ERROR:\n" strings in order to find out the actual error (as a parameter to __fatal_error() function).
- Tue Jan 22, 2019 8:37 am
- Forum: General Discussion and Questions
- Topic: Print statement management in micropython
- Replies: 2
- Views: 2208
Re: Print statement management in micropython
Regarding the memory management including some useful debugging techniques: https://docs.micropython.org/en/latest/reference/constrained.html#the-heap I don't think print() itself explicitly allocates any memory according to the mp_builtin_print() function ( py/modbuiltins.c ). However, your argumen...
- Tue Jan 22, 2019 12:14 am
- Forum: General Discussion and Questions
- Topic: Understanding Fatal Error with respect to STM32
- Replies: 9
- Views: 6540
Re: Understanding Fatal Error with respect to STM32
Any particular fatal errors like MemManage or HardFault?
Have you tried to set a breakpoint @ __fatal_error() function in ports/stm32/main.c (or in your HW STM32 port)?
Have you tried to set a breakpoint @ __fatal_error() function in ports/stm32/main.c (or in your HW STM32 port)?
- Mon Jan 14, 2019 11:21 am
- Forum: Development of MicroPython
- Topic: Subclassing native classes
- Replies: 3
- Views: 4402
Re: Subclassing native classes
As per the Exception.__init__ method does not exist. item I think the limitation is that you should use super().__init__() instead of BaseNativeClass.__init__() in constructors of your subclasses derived from native classes. And I guess you should check native_base_init_wrapper() function from py/ob...
- Fri Dec 21, 2018 8:48 pm
- Forum: Development of MicroPython
- Topic: Right way of synchronizing C and Micropython
- Replies: 4
- Views: 4093
Re: Right way of synchronizing C and Micropython
Use case is any library with MicroPython interface that performs some async work, creates threads, handles interrupts etc. I would expect this to be rather common. I would say more common is avoiding any undocumented, highly experimental features with unstable API like preemptive multitasking in Mi...
- Fri Dec 21, 2018 9:43 am
- Forum: Development of MicroPython
- Topic: Right way of synchronizing C and Micropython
- Replies: 4
- Views: 4093
Re: Right way of synchronizing C and Micropython
I don't fully understand your use case, but usually the right way to protect a C/C++ structure from concurrent access is by using a mutex in your C/C++ code.
- Fri Dec 21, 2018 2:56 am
- Forum: General Discussion and Questions
- Topic: Using pickle for classes
- Replies: 0
- Views: 11588
Using pickle for classes
I'm struggling to understand how I can pickle arbitrary classes in MicroPython. Currently uP pickle is implemented using repr() and it looks like in order for a class to be pickleable it has to implement __repr__() method with a specific output format (similar to creating an object of the class). Is...
- Wed May 30, 2018 1:34 am
- Forum: Development of MicroPython
- Topic: Reading global Python variable from C code
- Replies: 4
- Views: 3801
Re: Reading global Python variable from C code
Thanks a lot for your responses jickster and stijn! I'll try to use mp_load_global/mp_store_global and mp_load_name/mp_store_name with gc_lock/gc_unlock guards and extra synchronisation first.