Skip to content

Commit 8524746

Browse files
committed
GDB: bug fixes
1 parent b9164ac commit 8524746

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

platforms/m3/prc_v14/software/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ BINS := $(foreach var,$(DIRS),$(var)/$(var).bin)
7979
HEXS := $(foreach var,$(DIRS),$(var)/$(var).hex)
8080
ELFS := $(foreach var,$(DIRS),$(var)/$(var).elf)
8181

82-
.PRECIOUS: $(LIBS) $(BINS) $(ELFS)
82+
.PRECIOUS: $(LIBS) $(BINS) $(ELFS) $(GDB)
8383

8484
.PHONY: all
8585

86-
all: $(HEXS)
86+
all: $(GDB) $(HEXS)
8787

8888
$(DIRS):
8989
$(MAKE) $@/$@.hex
@@ -94,7 +94,7 @@ $(DIRS):
9494

9595
#%.bin: $$(wildcard $$(dir $$*)*.c)
9696

97-
%.o: $(HEADERS) $(GDB)
97+
%.o: $(HEADERS)
9898

9999
%.hex: %.bin
100100
xxd -g1 -c1 $< | cut -d' ' -f2 > $@
@@ -129,6 +129,7 @@ clean:
129129
rm -f $(HEXS)
130130
rm -f $(LIBS)
131131
rm -f $(ELFS)
132+
rm -f $(GDB)
132133

133134
clean-%:
134135
rm -f $*/$*.bin $*/$*.hex

platforms/m3/prc_v14/software/gdb/gdb.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
#include "PRCv14.h"
2222

23-
#include "gdb.h"
24-
2523
/* this struct is used by the assembley-level file 'gdb.s'
2624
* and must stay in this specific order
2725
*/
@@ -68,7 +66,7 @@ struct svc_args
6866
*
6967
*/
7068
void _gdb_break( struct svc_args * regs)
71-
__attribute__ ((noinline,used,section("gdb")));
69+
__attribute__ ((noinline,used));
7270

7371
/**
7472
* High-level (C) function called in reponse to a "halt" interrupt
@@ -77,7 +75,7 @@ void _gdb_break( struct svc_args * regs)
7775
* @regs: a copy of the processor registers as the existed pre-halt
7876
*/
7977
void _gdb_halt( struct svc_args * regs)
80-
__attribute__ ((noinline,used,section("gdb")));
78+
__attribute__ ((noinline,used));
8179

8280
/**
8381
* writes a 32-bit message over MBUS
@@ -89,7 +87,7 @@ void _gdb_halt( struct svc_args * regs)
8987
* @data the 32-bit data to be written
9088
*/
9189
uint32_t _gdb_mbus_write_message32(uint32_t addr, uint32_t data)
92-
__attribute__ ((used,section("gdb")));
90+
__attribute__ ((used));
9391

9492

9593

@@ -160,7 +158,7 @@ void _gdb_break( struct svc_args * regs)
160158
}
161159

162160
//so we can soft-step into mbus_write_message32
163-
uint32_t gdb_mbus_write_message32(uint32_t addr, uint32_t data) {
161+
uint32_t _gdb_mbus_write_message32(uint32_t addr, uint32_t data) {
164162
uint32_t mbus_addr = 0xA0003000 | (addr << 4);
165163
*((volatile uint32_t *) mbus_addr) = data;
166164
return 1;

0 commit comments

Comments
 (0)