Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Why Altera MPL (Minimal Preloader) build error with ARMCC ?

Follow the instruction of C:\altera\14.1\embedded\examples\software\Altera-SoCFPGA-HardwareLib-MPL\README.txt.

I am using Cyclone V SoC Dev Kit, in comfig.mk, I modified content as below:

BOOT_SOURCE := QSPI

DEVICE := C5

COMPILER := gnu

I am using DS-5 to import this example (C:\altera\14.1\embedded\examples\software\Altera-SoCFPGA-HardwareLib-MPL)

Build project is successful.

But when I set

COMPILER := arm

then get compile error as below:

armcc -o bin/sequencer.o -c -g -O3 -I. -I./core/ -I./core/altera_ip -IC:/altera/14.1/embedded/ip/altera/hps/altera_hps/hwlib/include -IC:/altera/14.1/embedded/ip/altera/hps/altera_hps/hwlib/include/socal -IC:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/software/preloader/generated -IC:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0 -DARMCC -DQSPI_BOOT -DCONFIG_SOCFPGA_CYCLONE5 -DPRINTF_UART --diag_suppress=9931 --cpu=Cortex-A9.no_neon.no_vfp --split_sections --c99 --no_unaligned_access -DARMCOMPILER --diag_suppress=68 --diag_suppress=177 --diag_suppress=550 C:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/sequencer.c

"C:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/sequencer.c", line 76: Error: # 79: expected a type specifier

asm(".global __alt_stack_pointer");

^

"C:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/sequencer.c", line 76: Error: # 260-D: explicit type is missing ("int" assumed)

asm(".global __alt_stack_pointer");

^

"C:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/sequencer.c", line 77: Error: # 79: expected a type specifier

asm("__alt_stack_pointer = " STRINGIFY(STACK_POINTER));

^

"C:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/sequencer.c", line 77: Error: # 260-D: explicit type is missing ("int" assumed)

asm("__alt_stack_pointer = " STRINGIFY(STACK_POINTER));

^

C:/altera/14.1/embedded/examples/hardware/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/sequencer.c: 0 warnings, 4 errors

make: *** [bin/sequencer.o] Error 1

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    sequence.c

    line 76 asm(".global __alt_stack_pointer");

    77 asm("__alt_stack_pointer = " STRINGIFY(STACK_POINTER));
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I was told that this is a known issue and the workaround is to comment out the assembly code at the top of sequence.c