-
Notifications
You must be signed in to change notification settings - Fork 669
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
Initial RAM optimization for ESP8266 #1233
Initial RAM optimization for ESP8266 #1233
Conversation
#ifdef CONFIG_STORE_CONST_IN_ROM | ||
#ifndef ICACHE_RODATA_ATTR | ||
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text"))) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#endif /* !ICACHE_RODATA_ATTR */
350a0dd
to
5ab9da0
Compare
LGTM |
@@ -166,6 +166,15 @@ | |||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */ | |||
|
|||
/** | |||
* Normally your compiler stores const(ant)s in ROM. Thus saving RAM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally compilers store...
21a0dcd
to
a3b215d
Compare
ifneq ($(MFORCE32),) | ||
# If your compiler supports the -mforce-l32 flag then | ||
# uncomment the lines below to gain additional Kb free RAM | ||
ESP_CFLAGS += -DCONFIG_STORE_CONST_IN_ROM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The define could be added here :)
a3b215d
to
1430be7
Compare
@zherczeg I added the recommended changes. |
ifneq ($(MFORCE32),) | ||
# Your compiler supports the -mforce-l32 flag then | ||
# contants can be placed in ROM to free additional RAM | ||
ESP_CFLAGS += -DJERRY_CONST_DATA="__attribute__((aligned(4))) __attribute__((section(".irom.text")))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert of GNU make, but the double quote usage is a bit odd to me here. Are you sure this will work as expected? Shouldn't be escaped the quotes around .irom.text
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can change them to "
I like this patch much better. LGTM after Laszlo's comments are fixed. |
1430be7
to
82bba0d
Compare
by putting big constants into ROM, instead of residing in RAM. Related to jerryscript-project#1224. JerryScript-DCO-1.0-Signed-off-by: Slavey Karadzhov slaff@attachix.com
82bba0d
to
ce8abfb
Compare
Still LGTM |
@slaff, thanks for the fixes. LGTM |
by putting big constants into ROM, instead of residing in RAM.
Related to #1224.
JerryScript-DCO-1.0-Signed-off-by: Slavey Karadzhov slaff@attachix.com