Skip to content

pce cd: Declaring global variables makes pce-mkcd fail #385

@est77

Description

@est77

In the latest releases of llvm-mos-sdk, using the pce-cd target, declaring any global variable makes pce-mkcd fail with the following error:

Error: Don't know how to convert ELF file "main.elf" (00F82020 - 01804030) into binary file!

Minimal repro:

`
#define PCE_CONFIG_IMPLEMENTATION
#include <pce.h>

PCE_RAM_BANK_AT(128, 2);

// Comment me to fix the pce-mkcd error.
attribute((retain)) volatile uint8_t g_global_var;

[[noreturn]] int main(void)
{
while(true) {}
}
`
Build steps:

mos-pce-cd-clang++ -Tipl.ld main.cpp -o main.elf pce-mkcd hello.iso --ipl ipl.bin main.elf -v

This used to work in older versions of the SDK, around version 14 I think. In newer versions it fails. I tested 18.0, 20.0 and 21 and they fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions