Add binary info indicating WAD/WXD type and flash load address

This commit is contained in:
graham sanderson 2022-04-04 12:45:05 -05:00
parent 1b26756b63
commit c77136a248

View file

@ -28,7 +28,7 @@
#include "w_wad.h" #include "w_wad.h"
#if PICO_BUILD #if PICO_BUILD
#include "pico.h" #include "pico.h"
#include "pico.h" #include "pico/binary_info.h"
#else #else
#define panic I_Error #define panic I_Error
#endif #endif
@ -38,6 +38,13 @@
#error TINY_WAD_ADDR must be specified #error TINY_WAD_ADDR must be specified
#endif #endif
#define wad_map_base ((const uint8_t *)TINY_WAD_ADDR) #define wad_map_base ((const uint8_t *)TINY_WAD_ADDR)
// simplest thing here is to use a feature, rather than a separate feature group
#if WHD_SUPER_TINY
#define ADDR_FNAME "WHX at " __XSTRING(TINY_WAD_ADDR)
#else
#define ADDR_FNAME "WHD at " __XSTRING(TINY_WAD_ADDR)
#endif
bi_decl(bi_program_feature(ADDR_FNAME));
#endif #endif
#if !USE_WHD #if !USE_WHD