Hello. I want to use visualGBD and try to resolve some issues.
I need to insert an external file in .bin file at the specified address to access it from the program. For example a picture or file .css. in IAR is done with the aid of the linker configuration file .icf.
1) set .icf file
define symbol __ICFEDIT_region_APP_start__ = 0x00020100;
define symbol __ICFEDIT_region_APP_end__ = 0x0007FFFF;
define region APP_region = mem:[from __ICFEDIT_region_APP_start__ to __ICFEDIT_region_APP_end__];
define region APP_region = mem:[from __ICFEDIT_region_APP_start__ to __ICFEDIT_region_APP_end__];
place in APP_region {readonly section favicon.ico};
place in APP_region {readonly section MasterPage.html};
place in APP_region {readonly section style.css};
2) set project options -> Linker -> Extra Options
–keep __favicon.ico
–image_input $PROJ_DIR$\WebPages\html\favicon.ico,__favicon.ico,favicon.ico,4
–keep __MasterPage.html
–image_input $PROJ_DIR$\WebPages\html\MasterPage.html,__MasterPage.html,MasterPage.html,4
–keep __style.css
–image_input $PROJ_DIR$\WebPages\html\style.css,__style.css,style.css,4
3) Use in code:
#pragma section = “favicon.ico”
/**/
bool GetFavIcon(http_t* http)
{
http_writen(http, (const char*)__section_begin(“favicon.ico”), __section_size(“favicon.ico”) );
http_writen(http, “\r\n\r\n”, sizeof(“\r\n\r\n”) );
return true;
}
whether it is possible to do something like?
-
This topic was modified 9 years, 5 months ago by andrei0686.
-
This topic was modified 9 years, 5 months ago by andrei0686.
-
This topic was modified 9 years, 5 months ago by andrei0686.