29
include/gdb_if.h
Normal file
29
include/gdb_if.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of the Black Magic Debug project.
|
||||
*
|
||||
* Copyright (C) 2011 Black Sphere Technologies Ltd.
|
||||
* Written by Gareth McMullin <gareth@blacksphere.co.nz>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDB_IF_H
|
||||
#define __GDB_IF_H
|
||||
|
||||
int gdb_if_init(void);
|
||||
unsigned char gdb_if_getchar(void);
|
||||
unsigned char gdb_if_getchar_to(int timeout);
|
||||
void gdb_if_putchar(unsigned char c, int flush);
|
||||
|
||||
#endif
|
18
include/general.h
Normal file
18
include/general.h
Normal file
@ -0,0 +1,18 @@
|
||||
#undef _GNU_SOURCE
|
||||
#include_next <general.h>
|
||||
|
||||
#ifndef __BLACKMAGIC_SYS_GENERAL_H
|
||||
#define __BLACKMAGIC_SYS_GENERAL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// #define PRINT_NOOP() do {} while(0)
|
||||
// #define DEBUG_WARN(x, ...) PRINT_NOOP()
|
||||
// #define DEBUG_ERROR(x, ...) PRINT_NOOP()
|
||||
// #define DEBUG_INFO(x, ...) PRINT_NOOP()
|
||||
// #define DEBUG_GDB(x, ...) PRINT_NOOP()
|
||||
// #define DEBUG_TARGET(x, ...) PRINT_NOOP()
|
||||
|
||||
#endif /* __BLACKMAGIC_SYS_GENERAL_H */
|
38
include/platform.h
Normal file
38
include/platform.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef __BLACKMAGIC_SYS_PLATFORM_H
|
||||
#define __BLACKMAGIC_SYS_PLATFORM_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define SWDIO_MODE_FLOAT() \
|
||||
do \
|
||||
{ \
|
||||
} while (0)
|
||||
|
||||
#define SWDIO_MODE_DRIVE() \
|
||||
do \
|
||||
{ \
|
||||
} while (0)
|
||||
|
||||
#define TMS_SET_MODE() \
|
||||
do \
|
||||
{ \
|
||||
} while (0)
|
||||
|
||||
#define TMS_PIN 1
|
||||
#define TCK_PIN 2
|
||||
#define TDI_PIN 3
|
||||
#define TDO_PIN 4
|
||||
|
||||
#define SWDIO_PIN 5
|
||||
#define SWCLK_PIN 6
|
||||
#define SRST_PIN 7
|
||||
|
||||
#define SWCLK_PORT 0
|
||||
#define SWDIO_PORT 0
|
||||
|
||||
#define gpio_set(port, pin)
|
||||
#define gpio_clear(port, pin)
|
||||
#define gpio_get(port, pin) 0
|
||||
#define gpio_set_val(port, pin, value)
|
||||
|
||||
#endif /* __BLACKMAGIC_SYS_PLATFORM_H */
|
3
include/target.h
Normal file
3
include/target.h
Normal file
@ -0,0 +1,3 @@
|
||||
#ifndef __BLACKMAGIC_SYS_TARGET_H
|
||||
#define __BLACKMAGIC_SYS_TARGET_H
|
||||
#endif /* __BLACKMAGIC_SYS_TARGET_H */
|
Reference in New Issue
Block a user