/ software / apps / bad_apple / CMakeLists.txt
CMakeLists.txt
 1  # Replace TMDS with 10 bit UART (same baud rate):
 2  # add_definitions(-DDVI_SERIAL_DEBUG=1)
 3  # add_definitions(-DRUN_FROM_CRYSTAL)
 4  
 5  add_executable(bad_apple
 6  	main.c
 7  	rle_decompress.h
 8  	rle_decompress.S
 9  )
10  
11  # Increase CLKDIV to 4, because we're going to run the system at 372 MHz, and
12  # the flash gets rather unhappy if you try to clock it at 186 MHz
13  pico_clone_default_boot_stage2(bad_apple_boot2)
14  target_compile_definitions(bad_apple_boot2 PRIVATE PICO_FLASH_SPI_CLKDIV=4)
15  pico_set_boot_stage2(bad_apple bad_apple_boot2)
16  
17  target_include_directories(bad_apple PRIVATE
18  	${CMAKE_CURRENT_LIST_DIR}
19  )
20  
21  target_compile_definitions(bad_apple PRIVATE
22  	DVI_DEFAULT_SERIAL_CONFIG=${DVI_DEFAULT_SERIAL_CONFIG}
23  	DVI_VERTICAL_REPEAT=1
24  	DVI_N_TMDS_BUFFERS=3
25  	DVI_MONOCHROME_TMDS
26  )
27  
28  target_link_libraries(bad_apple
29  	pico_stdlib
30  	hardware_dma
31  	pico_multicore
32  	pico_util
33  	libdvi
34  	libsprite
35  )
36  
37  # create map/bin/hex file etc.
38  pico_add_extra_outputs(bad_apple)