Search found 2756 matches

by dhylands
Wed May 23, 2018 9:13 pm
Forum: ESP8266 boards
Topic: Filesystem: Maximum number of files/directories
Replies: 1
Views: 83

Re: Filesystem: Maximum number of files/directories

Not sure why you would be limited to a filesize of 25K. In general there is no need to read the entire file into memory.
You can open a file in append mode and just keep writing to it.

Creating files consumes flash blocks since the directory is also stored on the filesystem.
by dhylands
Wed May 23, 2018 2:49 pm
Forum: Development of MicroPython
Topic: compiling on ubuntu 18.04
Replies: 3
Views: 112

Re: compiling on ubuntu 18.04

You can also put the bin directory from the unpacked tarball into your PATH and then you don't need to use CROSS_COMPILE
by dhylands
Wed May 23, 2018 2:45 pm
Forum: Other Boards
Topic: [LPC1778] uClinux 2.6.xx port
Replies: 4
Views: 105

Re: [LPC1778] uClinux 2.6.xx port

Yeah. It looks like the micropython_minimal.gdb file is the one you want to strip.
by dhylands
Tue May 22, 2018 7:55 pm
Forum: Development of MicroPython
Topic: compiling on ubuntu 18.04
Replies: 3
Views: 112

Re: compiling on ubuntu 18.04

I went to https://developer.arm.com/open-source/g ... /downloads and downloaded the "Linux 64-bit" tarball.

It seems to be working fine under ubuntu 18.04.
by dhylands
Tue May 22, 2018 7:46 pm
Forum: Other Boards
Topic: [LPC1778] uClinux 2.6.xx port
Replies: 4
Views: 105

Re: [LPC1778] uClinux 2.6.xx port

strip requires an ELF file. You can use the 'file' command under linux to determine the type of a file. My guess is that you're looking at a binary data file and not the .elf file.
by dhylands
Tue May 22, 2018 7:43 pm
Forum: The MicroPython pyboard
Topic: Use the serial port to update the firmware
Replies: 4
Views: 114

Re: Use the serial port to update the firmware

That code is actually doing a RESET from the code. So it should launch the bootloader. The bootloader will then select which mode to use by following the flow chart shown on page 97 of the AN2606 document:
http://www.st.com/resource/en/applicati ... 167594.pdf
by dhylands
Mon May 21, 2018 6:56 pm
Forum: Development of MicroPython
Topic: [SOLVED]Porting core micropython: architecture-specific functions
Replies: 1
Views: 59

Re: Porting core micropython: architecture-specific functions

I think that the nlr code (which I'm pretty sure can be done using setjmp/longjmp), the gchelper function, and the startup/ISR code are the primary non-peripheral things. Supporting the native and viper code generators also requires architecture specific code, but this functionality isn't required t...
by dhylands
Mon May 21, 2018 5:49 pm
Forum: The MicroPython pyboard
Topic: Use the serial port to update the firmware
Replies: 4
Views: 114

Re: Use the serial port to update the firmware

Yes. I wrote a blog post about it over here:
http://blog.davehylands.com/2014/02/ser ... m32f4.html
That blog post is 4 years old, so its possible it might not work. I'd be interested to hear if it works for you.
by dhylands
Thu May 17, 2018 6:12 am
Forum: General Discussion and Questions
Topic: converting png file to bytearray
Replies: 23
Views: 395

Re: converting png file to bytearray

Right. You don't want the raw PNG file, but rather what the PNG file would look like once it's decoded into memory. PNG files can incorporate compression, and you may need to consider pixel conversion. i.e. if your source PNG was an 24-bit-per-pixel image and you wanted a 1-bit-per-pixel PNG file. Y...
by dhylands
Thu May 17, 2018 5:42 am
Forum: General Discussion and Questions
Topic: converting png file to bytearray
Replies: 23
Views: 395

Re: converting png file to bytearray

In which case, something like this should work:

Code: Select all

def png2ba(file='img.png',name='icon'):
  with open(file, "rb") as imageFile:
    src = imageFile.read()
  
  with open(name + '.py', 'wb') as tgt:
    tgt.write("x = ")
    tgt.write(repr(src))
    tgt.write('\n')