Jean-MarcHarvengt / MCUME

Multi CompUter Machine Emulator for several MCUs
423 stars 60 forks source link

Unable to build #11

Closed prashantkamdar closed 2 years ago

prashantkamdar commented 2 years ago

I am unable to build because files inside the folder of picovga_t4 are missing (PICOVGA_T4_SOURCES).

CMake Error at CMakeLists.txt:329 (add_executable):
  Cannot find source file:

    picovga_t4/vga_layer.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

Many files are missing.

Please help.

Jean-MarcHarvengt commented 2 years ago

All files are there. Please clone properly, clear build directory. copy dependencies (SDK) ask explain in readme.txt file. go to build dir. cmake .. make

przem360 commented 2 years ago

@Jean-MarcHarvengt I've tried to test it - it doesn't work for me either. After following instructions described in readme.md I got the same problem as @prashantkamdar . However it maybe just me not understanding what is what :disappointed: But after selecting in platform_config.h a PICOMPUTER and in CMakeList.txt commenting out everything related to VGA in add_executable, clearing build dir - it works.

But I have now problem with compiling for MCUME_REV1. If I leave uncommented ${PICOVGA_T4_SOURCES} I have same problem as @prashantkamdar If I comment out ${PICOVGA_T4_SOURCES} and if I leave uncommented ${VGA_T4_SOURCES} I have a bunch of errors:

In file included from /home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:11,
                 from /home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:21:
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:22:89: error: too many decimal points in number
                             ; todo perhaps change this to out exec, 16... so that we can do multiple things (including setting black pixel)
                                                                     ^~~~~

/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:2:13: error: expected constructor, destructor, or type conversion before '(' token
 ; Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
             ^
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:4:3: error: 'SPDX' does not name a type
 ; SPDX-License-Identifier: BSD-3-Clause
   ^~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:7:3: error: 'Default' does not name a type
 ; Default scanline program (|| means aligned word boundary, | means hword boundary)
   ^~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:9:13: error: 'must' does not name a type
 .origin 0 ; must load at zero (offsets are hardcoded in instruction stream)
             ^~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:10:20: error: 'set' does not name a type; did you mean 'getw'?
 .define extra0 0 ; set later by code based on xscale
                    ^~~
                    getw
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:11:20: error: 'set' does not name a type; did you mean 'getw'?
 .define extra1 0 ; set later by code (1 more than extra0)
                    ^~~
                    getw
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:13:3: error: 'note' does not name a type
 ; note bpp must be a factor of 32
   ^~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:16:51: error: expected unqualified-id before '||' token
 public end_of_scanline_skip_ALIGN:              ; || jmp end_of_scanline_skip_ALIGN | ignored ||
                                                   ^~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:17:5: error: 'was' does not name a type; did you mean 'labs'?
   ; was 16 but we just discard the reset of the OSR
     ^~~
     labs
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:18:5: error: 'so' does not name a type
   ; so as to also support 8 bit grayscale
     ^~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:21:1: error: expected unqualified-id before 'public'
 public entry_point:
 ^~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:22:51: error: 'todo' does not name a type; did you mean 'modf'?
   wait irq, 4                                   ; todo perhaps change this to out exec, 16... so that we can do multiple things (including setting black pixel)
                                                   ^~~~
                                                   modf
In file included from /home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:11,
                 from /home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:21:
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:25:51: error: expected unqualified-id before '|' token
 public raw_run:                                 ; | jmp raw_run | color | n | <n + 2 colors> |
                                                   ^
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:33:2: error: expected unqualified-id before 'public'
 ;public raw_1p:                                  ; | jmp raw_1p | color |
  ^~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/scanvideo.pio.h:33:52: error: expected unqualified-id before '|' token
 ;public raw_1p:                                  ; | jmp raw_1p | color |
                                                    ^
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp: In function 'void core1_func()':
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:75:5: error: 'irq_set_exclusive_handler' was not declared in this scope
     irq_set_exclusive_handler(SIO_IRQ_PROC1,core1_sio_irq);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:77:5: error: 'irq_set_enabled' was not declared in this scope
     irq_set_enabled(SIO_IRQ_PROC1,true);
     ^~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:77:5: note: suggested alternative: 'pio_sm_set_enabled'
     irq_set_enabled(SIO_IRQ_PROC1,true);
     ^~~~~~~~~~~~~~~
     pio_sm_set_enabled
In file included from /usr/include/newlib/stdio.h:35,
                 from /home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.h:20,
                 from /home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:16:
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp: In function 'void init_pio_framebuffer(uint8_t*)':
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:14:39: error: 'video_24mhz_composable_default_offset_raw_run' was not declared in this scope
 #define video_24mhz_composable_prefix video_24mhz_composable_default
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:50: note: in expansion of macro '__EXTRA_CONCAT'
 #define video_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                  ^~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:66: note: in expansion of macro '__EXTRA_CONCAT'
 #define video_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                                  ^~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:81: note: in expansion of macro 'video_24mhz_composable_prefix'
 o_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:19:33: note: in expansion of macro 'video_24mhz_composable_program_extern'
 #define __DVP_JMP(x) ((unsigned)video_24mhz_composable_program_extern(x))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:21:28: note: in expansion of macro '__DVP_JMP'
 #define COMPOSABLE_RAW_RUN __DVP_JMP(raw_run)
                            ^~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:94:12: note: in expansion of macro 'COMPOSABLE_RAW_RUN'
     *p++ = COMPOSABLE_RAW_RUN;
            ^~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:14:39: note: suggested alternative: 'video_24mhz_composable_program_extern'
 #define video_24mhz_composable_prefix video_24mhz_composable_default
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:50: note: in expansion of macro '__EXTRA_CONCAT'
 #define video_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                  ^~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:66: note: in expansion of macro '__EXTRA_CONCAT'
 #define video_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                                  ^~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:81: note: in expansion of macro 'video_24mhz_composable_prefix'
 o_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:19:33: note: in expansion of macro 'video_24mhz_composable_program_extern'
 #define __DVP_JMP(x) ((unsigned)video_24mhz_composable_program_extern(x))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:21:28: note: in expansion of macro '__DVP_JMP'
 #define COMPOSABLE_RAW_RUN __DVP_JMP(raw_run)
                            ^~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:94:12: note: in expansion of macro 'COMPOSABLE_RAW_RUN'
     *p++ = COMPOSABLE_RAW_RUN;
            ^~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:14:39: error: 'video_24mhz_composable_default_offset_end_of_scanline_skip_ALIGN' was not declared in this scope
 #define video_24mhz_composable_prefix video_24mhz_composable_default
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:50: note: in expansion of macro '__EXTRA_CONCAT'
 #define video_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                  ^~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:66: note: in expansion of macro '__EXTRA_CONCAT'
 #define video_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                                  ^~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:18:81: note: in expansion of macro 'video_24mhz_composable_prefix'
 o_24mhz_composable_program_extern(x) __EXTRA_CONCAT( __EXTRA_CONCAT(video_24mhz_composable_prefix, _offset_), x)
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:19:33: note: in expansion of macro 'video_24mhz_composable_program_extern'
 #define __DVP_JMP(x) ((unsigned)video_24mhz_composable_program_extern(x))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/composable_scanline.h:20:35: note: in expansion of macro '__DVP_JMP'
 #define COMPOSABLE_EOL_SKIP_ALIGN __DVP_JMP(end_of_scanline_skip_ALIGN)
                                   ^~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:104:12: note: in expansion of macro 'COMPOSABLE_EOL_SKIP_ALIGN'
     *p++ = COMPOSABLE_EOL_SKIP_ALIGN;
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp: In function 'void core1_sio_irq()':
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:1658:3: error: 'irq_clear' was not declared in this scope
   irq_clear(SIO_IRQ_PROC1);
   ^~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp: In member function 'void VGA_T4::begin_audio(int, void (*)(short int*, int))':
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:1688:3: error: 'irq_set_exclusive_handler' was not declared in this scope
   irq_set_exclusive_handler(PWM_IRQ_WRAP, AUDIO_isr);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:1689:3: error: 'irq_set_priority' was not declared in this scope
   irq_set_priority (PWM_IRQ_WRAP, 128);
   ^~~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:1690:3: error: 'irq_set_enabled' was not declared in this scope
   irq_set_enabled(PWM_IRQ_WRAP, true);
   ^~~~~~~~~~~~~~~
/home/pi/lab/PicoVMS/MCUME_pico/vga_t4/VGA_t4.cpp:1690:3: note: suggested alternative: 'pwm_set_enabled'
   irq_set_enabled(PWM_IRQ_WRAP, true);
   ^~~~~~~~~~~~~~~
   pwm_set_enabled
make[2]: *** [CMakeFiles/mcume.dir/build.make:186: CMakeFiles/mcume.dir/vga_t4/VGA_t4.cpp.obj] Błąd 1
make[1]: *** [CMakeFiles/Makefile2:1630: CMakeFiles/mcume.dir/all] Błąd 2
make: *** [Makefile:103: all] Błąd 2

Could someone provide an example setup for VGA?

Jean-MarcHarvengt commented 2 years ago

It seems the MCUME_pico/CMakeLists.txt was not the correct one and was never updated by me since I changed the VGA library! I uploaded, it is default configured for C64 emu now!

Sorry...

przem360 commented 2 years ago

Great! Thanks! BTW - awesome project :)

prashantkamdar commented 2 years ago

thank you, this is finally worked now!

add_executable(mcume
        # ${GFXENGINE_SOURCES}
        # ${PICO20_SOURCES}
        # ${PICO64_SOURCES}
        # ${PICO81_SOURCES}
        # ${PICO800_SOURCES}
        # ${PICO5200_SOURCES}
        # ${PICO8086_SOURCES}
        # ${PICOCOLEM_SOURCES}
        # ${PICOO2EM_SOURCES}
        # ${PICOVCS_SOURCES}
        # ${PICOSPECCY_SOURCES}
        ${PICONOFRENDO_SOURCES}
        # ${PICOSND_SOURCES}
        # ${TESTIO_SOURCES}
        # ${TESTVGA_SOURCES}
        # ${TESTKEYMAX_SOURCES}
        # ${TESTPSRAM_SOURCES}
        # ${PICOVALIDATION_SOURCES}
        # ${PSRAM_SOURCES}
        # ${VGA_T4_SOURCES}
        # ${PICOVGA_T4_SOURCES}
        ${TFT_T_SOURCES}
    )

I copied the uf2 to pico in after building nofrendo.