mirror of https://github.com/thesofproject/sof.git
cnl: core: Add support for xcc
xcc has more strict rules than gcc: - Add missing sections to linker scripts - Fix compile warnings - Extend memory enabling timeout to infinite (too small delay for xcc) Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com> # Conflicts: # src/platform/apollolake/platform.c # src/platform/cannonlake/platform.c
This commit is contained in:
parent
8ce5f8efa6
commit
273f73fc5c
|
@ -211,11 +211,18 @@ static int man_get_module_manifest(struct image *image, struct module *module,
|
|||
section = &module->section[man_section_idx];
|
||||
|
||||
/* load in manifest data */
|
||||
/* module built using xcc has preceding bytes */
|
||||
if (section->sh_size > sizeof(sof_mod))
|
||||
ret = fseek(module->fd,
|
||||
section->sh_offset + XCC_MOD_OFFSET, SEEK_SET);
|
||||
else
|
||||
ret = fseek(module->fd, section->sh_offset, SEEK_SET);
|
||||
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "error: can't seek to section %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
count = fread(&sof_mod, 1, sizeof(sof_mod), module->fd);
|
||||
if (count != sizeof(sof_mod)) {
|
||||
fprintf(stderr, "error: can't read section %d\n", -errno);
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#define MAN_PAGE_SIZE 4096
|
||||
|
||||
/* start offset for modules built using xcc */
|
||||
#define XCC_MOD_OFFSET 0x8
|
||||
|
||||
/* start offset for base FW module */
|
||||
#define FILE_TEXT_OFFSET 0x8000
|
||||
|
||||
|
|
Loading…
Reference in New Issue