git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15629 27425a3e-05d8-49a3-a47f-9c15f0e5edd8

This commit is contained in:
Giovanni Di Sirio 2022-05-17 13:18:32 +00:00
parent 47e2903468
commit 9880ff9258
3 changed files with 15 additions and 1 deletions

View File

@ -5,7 +5,7 @@
# Compiler options here. # Compiler options here.
ifeq ($(USE_OPT),) ifeq ($(USE_OPT),)
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
endif endif
# C specific options here (added to USE_OPT). # C specific options here (added to USE_OPT).

View File

@ -18,6 +18,14 @@
#include "sbuser.h" #include "sbuser.h"
__attribute__((naked))
void __crt0_vrq(int vrqn) {
(void)vrqn;
__sb_vrq_return();
}
/* /*
* Application entry point. * Application entry point.
*/ */
@ -30,6 +38,9 @@ int main(void) {
while (true) { while (true) {
} }
#endif #endif
__sb_vrq_seten(2);
__sb_vrq_setwt(2);
while (true) { while (true) {
msg_t msg = sbMsgWait(); msg_t msg = sbMsgWait();
printf("#1 Hello World (%u)!!\r\n", (unsigned)msg); printf("#1 Hello World (%u)!!\r\n", (unsigned)msg);

View File

@ -55,6 +55,9 @@ __STATIC_FORCEINLINE void vrq_makectx(sb_class_t *sbp,
uint32_t irqn = __CLZ(active_mask); uint32_t irqn = __CLZ(active_mask);
sbp->vrq_wtmask &= ~(1U << irqn); sbp->vrq_wtmask &= ~(1U << irqn);
/* Disabling VRQs globally during processing.*/
sbp->vrq_isr |= SB_VRQ_ISR_DISABLED;
/* Building the return context.*/ /* Building the return context.*/
newctxp->r0 = irqn; newctxp->r0 = irqn;
newctxp->pc = sbp->sbhp->hdr_vrq; newctxp->pc = sbp->sbhp->hdr_vrq;