Search found 46 matches

by shazz
Fri May 24, 2019 12:19 am
Forum: Other Boards
Topic: [Any STM32 board] How much time this loop should take ?
Replies: 14
Views: 8567

Re: [Any STM32 board] How much time this loop should take ?

Thanks Chuckbook, OutoftheBOTS, and Jimmo my logical analyzer doesn't have enough bandwidth I presume...So objdump will do :) gcc is smater than me: 00000000 <perf_count>: 0: b510 push {r4, lr} 2: f7ff fffe bl 0 <HAL_GetTick> 6: 4b06 ldr r3, [pc, #24] ; (20 <perf_count+0x20>) 8: 4604 mov r4, r0 ----...
by shazz
Thu May 23, 2019 1:01 am
Forum: Other Boards
Topic: [Any STM32 board] How much time this loop should take ?
Replies: 14
Views: 8567

[Any STM32 board] How much time this loop should take ?

Hi, I' m debugging weird clock settings on my board and I was running some performance tests. I added a C module doing : #define NOP asm volatile(" nop \n\t") STATIC mp_obj_t perf_count(size_t n_args, const mp_obj_t *args) { (void)n_args; uint32_t start = HAL_GetTick(); uint32_t count = 0; uint32_t ...
by shazz
Mon May 20, 2019 11:28 am
Forum: Development of MicroPython
Topic: Find out how much RAM will be used by MicroPython at compile the runtime
Replies: 5
Views: 4822

Re: Find out how much RAM will be used by MicroPython at compile the runtime

Thanks,
Yes, exactly. I meant
- core: py/*.c
- modules: extmod/*.c => so that in the board definition I can select/remove modules based on my RAM needs

I will play with nm and add a little script to generate those stats on demand, at least to keep track of the memory (flash and RAM) usage.
by shazz
Mon May 20, 2019 12:41 am
Forum: Development of MicroPython
Topic: Find out how much RAM will be used by MicroPython at compile the runtime
Replies: 5
Views: 4822

Find out how much RAM will be used by MicroPython at compile the runtime

Hi, Sorry if this topic was already discussed... did not find it while searching the forums. Before I start coding some useless tools, is there a way to: - at compile time to show the RAM and Flash that will be allocated by the core and each module (kind of size mod....o ?) - at runtime to monitor d...
by shazz
Mon May 20, 2019 12:23 am
Forum: Announcements and News
Topic: MicroPython running "bare metal" in the browser via unicorn.js
Replies: 9
Views: 106276

Re: MicroPython running "bare metal" in the browser via unicorn.js

Yes! Could we upgrade ? I like to use it to test things when I don't have my env.
Thanks !
by shazz
Sun May 19, 2019 12:59 pm
Forum: Development of MicroPython
Topic: [SOLVED] Nanojpeg module example, video from Damien
Replies: 3
Views: 2718

Re: [SOLVED] Nanojpeg module example, video from Damien

Hi mattyt, It already works, at least on my Meowbit (STM32F4 + flash or sd + TFT7735), was not complicated: https://github.com/shazz/micropython/blob/master/extmod/modimage.c this module relies on the Framebuf module somewhat modified to handle more modes (16 colors, 256 colors, rgr565...) If any qu...
by shazz
Sun May 19, 2019 1:56 am
Forum: Development of MicroPython
Topic: [SOLVED] Nanojpeg module example, video from Damien
Replies: 3
Views: 2718

Re: [SOLVED] Nanojpeg module example, video from Damien

Ah, I found picojpeg, another JPEG decoder but optimized for MCU, only 2K of RAM used!
by shazz
Sat May 18, 2019 4:38 pm
Forum: Development of MicroPython
Topic: [SOLVED] Nanojpeg module example, video from Damien
Replies: 3
Views: 2718

[SOLVED] Nanojpeg module example, video from Damien

Hi, I was watching the video from Damien: MicroPython Melbourne Meetup: Wrap C In MicroPython. And I thought it would be cool to add the JPEG decoder to the Meowbit. As Damien in the video, same issue, the programs allocates too much memory to fit in the STM32F4 I was wondering if somebody tried to ...
by shazz
Sat May 18, 2019 4:19 pm
Forum: Programs, Libraries and Tools
Topic: [SOLVED ]VFS / vfs_fat, what is the difference between built-in SPI flash and SD card ?
Replies: 1
Views: 1817

Re: [SOLVED ]VFS / vfs_fat, what is the difference between built-in SPI flash and SD card ?

Ok I found out I need to retrieve the mount point first using: // retrieve VFS FAT mount mp_vfs_mount_t *vfs = mp_vfs_lookup_path(filename, &p_out); if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) { vfs_fat = MP_OBJ_TO_PTR(vfs->obj); } else { printf("Cannot find user mount for %s\n", filename); return...
by shazz
Wed May 15, 2019 5:21 pm
Forum: Programs, Libraries and Tools
Topic: [SOLVED] Possible to use cpp to create a new module?
Replies: 5
Views: 3455

Re: Possible to use cpp to create a new module?

Ok. I did not expect to code a module in CPP but the module would use the CPP library probably wrapped with a C interface. So I guess in this case, I would be outside the MicroPython headers but the memory management needs to be overloaded as you suggested. I'll try that... or use a C library :) Tha...