mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-08 08:55:01 -04:00
fw: simplify how to enable QEMU debug in firmware.
- Remove the define `NOCONSOLE`, add define `QEMU_CONSOLE` - Inverse the use of it, add the define to have QEMU debug output in fw. - Add a make target `qemu_firmware.elf` which builds the firmware with QEMU console enabled. Co-authored-by: Mikael Ågren <mikael@tillitis.se>
This commit is contained in:
parent
35052e50cb
commit
613316f53e
4 changed files with 24 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 - Tillitis AB
|
||||
* Copyright (C) 2022-2024 - Tillitis AB
|
||||
* SPDX-License-Identifier: GPL-2.0-only
|
||||
*/
|
||||
|
||||
|
@ -8,21 +8,21 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef NOCONSOLE
|
||||
#define htif_putc(ch)
|
||||
#define htif_lf()
|
||||
#define htif_puthex(c)
|
||||
#define htif_putinthex(n)
|
||||
#define htif_puts(s)
|
||||
#define htif_hexdump(buf, len)
|
||||
#else
|
||||
#ifdef QEMU_CONSOLE
|
||||
void htif_putc(char ch);
|
||||
void htif_lf();
|
||||
void htif_puthex(uint8_t c);
|
||||
void htif_putinthex(const uint32_t n);
|
||||
void htif_puts(const char *s);
|
||||
void htif_hexdump(void *buf, int len);
|
||||
#endif
|
||||
#else
|
||||
#define htif_putc(ch)
|
||||
#define htif_lf()
|
||||
#define htif_puthex(c)
|
||||
#define htif_putinthex(n)
|
||||
#define htif_puts(s)
|
||||
#define htif_hexdump(buf, len)
|
||||
#endif /* QEMU_CONSOLE */
|
||||
|
||||
void *memset(void *dest, int c, unsigned n);
|
||||
void memcpy_s(void *dest, size_t destsize, const void *src, size_t n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue