Skip to content

Fixed error: unknown type name 'size_t' and added support for ESPD-12 4 Mbyte flash model #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

einsteinx2
Copy link

Currently trying to adapt https://github.com/cnlohr/ws2812esp8266 for the Arduino IDE and ran into this compile error. Adding the definition to c_types.h fixed it.

Also, I added an option for the new ESPD-12 model to make the full 4 megabytes of flash available. Afaik all EDP-12 boards currently being sold are the new 4 megabyte models unless they're old stock. My supplier confirmed that the 512 kilobyte models are no longer available.

@einsteinx2 einsteinx2 changed the title Fixed error: unknown type name 'size_t' Fixed error: unknown type name 'size_t' and added support for ESPD-12 4 Mbyte flash model Apr 19, 2015
@igrr
Copy link
Member

igrr commented Apr 19, 2015

Thanks! Although I would rather include <stddef.h> where necessary, as it
has has size_t defined.
On Apr 20, 2015 7:21 AM, "Ben Baron" [email protected] wrote:

Currently trying to adapt https://github.com/cnlohr/ws2812esp8266 for the
Arduino IDE and ran into this compile error. Adding the definition to

c_types.h fixed it.

You can view, comment on, or merge this pull request online at:

#87
Commit Summary

  • Fixed error: unknown type name 'size_t'

File Changes

Patch Links:

Reply to this email directly or view it on GitHub
#87.

@einsteinx2
Copy link
Author

I had tried doing that, but at the time thought it was causing my section '.text' will not fit in region 'iram1_0_seg' errors. If that wasn't the case, I have no problem switching back to using it and removing this line.

In any case, You may still be interested in merging the ESPD-12 board changes.

@Links2004
Copy link
Collaborator

you also need adapt the linker file for the new size.

see:
https://github.com/esp8266/Arduino/blob/esp8266/hardware/tools/esp8266/sdk/ld/eagle.app.v6.ld#L8

the iram1_0_seg means the ram segment for code is full but not the flash
you need to use ICACHE_FLASH_ATTR
like here
https://github.com/esp8266/Arduino/blob/esp8266/hardware/esp8266com/esp8266/cores/esp8266/libc_replacements.c#L282
to move functions from ram to flash

@einsteinx2
Copy link
Author

Thanks for the info! I'm still new to all this, so still figuring things out. I'll try and get everything working this week.

@Links2004
Copy link
Collaborator

ok, is the ESPD-12 model identical to the boards sale as ESP-12?
http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family&s[]=esp&s[]=12#esp-12

can you read the marking / naming on the 4MB chip?

@einsteinx2
Copy link
Author

It appears that all new ESP-12 modules are actually the 4mbyte ESPD-12 modules, but just not advertised as such. I checked one that I got from a random aliexpress seller about a month ago that was advertised as ESP-12 and its 4 mbyte flash. And I recently purchased 20 ESPD-12 advertised modules from a supplier in alibaba, and that supplier indicated that his supplier no longer has 512kbyte models, and that all were now 4mbyte.

I can't see the flash chip as its under the metal cover, but I checked in software and both modules reported 4 mbyte. I can post the code I used when I get home tonight.

@einsteinx2
Copy link
Author

Adding ICACHE_FLASH_ATTR to all of the functions resolved that build issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants