git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7395 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2014-10-14 12:37:35 +00:00
parent 3b0fd0fa92
commit e571ffd648
6 changed files with 37 additions and 24 deletions

View File

@ -34,5 +34,10 @@
<type>2</type> <type>2</type>
<locationURI>CHIBIOS/os</locationURI> <locationURI>CHIBIOS/os</locationURI>
</link> </link>
<link>
<name>test</name>
<type>2</type>
<locationURI>CHIBIOS/test</locationURI>
</link>
</linkedResources> </linkedResources>
</projectDescription> </projectDescription>

View File

@ -332,7 +332,7 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#define CH_DBG_SYSTEM_STATE_CHECK FALSE #define CH_DBG_SYSTEM_STATE_CHECK TRUE
/** /**
* @brief Debug option, parameters checks. * @brief Debug option, parameters checks.
@ -341,7 +341,7 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#define CH_DBG_ENABLE_CHECKS FALSE #define CH_DBG_ENABLE_CHECKS TRUE
/** /**
* @brief Debug option, consistency checks. * @brief Debug option, consistency checks.
@ -351,7 +351,7 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#define CH_DBG_ENABLE_ASSERTS FALSE #define CH_DBG_ENABLE_ASSERTS TRUE
/** /**
* @brief Debug option, trace buffer. * @brief Debug option, trace buffer.
@ -372,7 +372,7 @@
* @note The default failure mode is to halt the system with the global * @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL. * @p panic_msg variable set to @p NULL.
*/ */
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK TRUE
/** /**
* @brief Debug option, stacks initialization. * @brief Debug option, stacks initialization.
@ -382,7 +382,7 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#define CH_DBG_FILL_THREADS FALSE #define CH_DBG_FILL_THREADS TRUE
/** /**
* @brief Debug option, threads profiling. * @brief Debug option, threads profiling.
@ -393,7 +393,7 @@
* @note This debug option is not currently compatible with the * @note This debug option is not currently compatible with the
* tickless mode. * tickless mode.
*/ */
#define CH_DBG_THREADS_PROFILING FALSE #define CH_DBG_THREADS_PROFILING TRUE
/** @} */ /** @} */

View File

@ -6,7 +6,7 @@
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value="set remotetimeout 20&#13;&#10;monitor arm7_9 dcc_downloads enable&#13;&#10;monitor arm7_9 fast_memory_access enable&#13;&#10;monitor reset&#13;&#10;monitor sleep 500&#13;&#10;monitor halt 50&#13;&#10;monitor sleep 500&#13;&#10;monitor poll&#13;&#10;monitor flash erase_sector 0 0 8&#13;&#10;"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value="set remotetimeout 20&#13;&#10;monitor arm7_9 dcc_downloads enable&#13;&#10;monitor arm7_9 fast_memory_access enable&#13;&#10;monitor reset&#13;&#10;monitor sleep 500&#13;&#10;monitor halt 50&#13;&#10;monitor sleep 500&#13;&#10;monitor poll&#13;&#10;monitor flash erase_sector 0 0 9&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="Generic TCP/IP"/> <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="Generic TCP/IP"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/> <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
@ -33,7 +33,7 @@
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/> <stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList/&gt;"/> <stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;lr_abt-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;cpsr-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r6-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r4-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r3-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r1-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r0-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/> <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/> <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/> <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>

View File

@ -307,7 +307,7 @@ struct context {
#if CH_DBG_ENABLE_STACK_CHECK #if CH_DBG_ENABLE_STACK_CHECK
#define port_switch(ntp, otp) { \ #define port_switch(ntp, otp) { \
register struct intctx *r13 asm ("r13"); \ register struct port_intctx *r13 asm ("r13"); \
if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \ if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \
chSysHalt("stack overflow"); \ chSysHalt("stack overflow"); \
_port_switch_thumb(ntp, otp); \ _port_switch_thumb(ntp, otp); \
@ -320,7 +320,7 @@ struct context {
#if CH_DBG_ENABLE_STACK_CHECK #if CH_DBG_ENABLE_STACK_CHECK
#define port_switch(ntp, otp) { \ #define port_switch(ntp, otp) { \
register struct intctx *r13 asm ("r13"); \ register struct port_intctx *r13 asm ("r13"); \
if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \ if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \
chSysHalt("stack overflow"); \ chSysHalt("stack overflow"); \
_port_switch_arm(ntp, otp); \ _port_switch_arm(ntp, otp); \

View File

@ -219,22 +219,22 @@ _port_irq_common:
bx r0 bx r0
.code 16 .code 16
#if CH_DBG_SYSTEM_STATE_CHECK #if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_lock bl _dbg_check_lock
#endif #endif
bl chSchDoReschedule bl chSchDoReschedule
#if CH_DBG_SYSTEM_STATE_CHECK #if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_unlock bl _dbg_check_unlock
#endif #endif
mov lr, pc mov lr, pc
bx lr bx lr
.code 32 .code 32
#else /* !defined(THUMB_NO_INTERWORKING) */ #else /* !defined(THUMB_NO_INTERWORKING) */
#if CH_DBG_SYSTEM_STATE_CHECK #if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_lock bl _dbg_check_lock
#endif #endif
bl chSchDoReschedule bl chSchDoReschedule
#if CH_DBG_SYSTEM_STATE_CHECK #if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_unlock bl _dbg_check_unlock
#endif #endif
#endif /* !defined(THUMB_NO_INTERWORKING) */ #endif /* !defined(THUMB_NO_INTERWORKING) */
@ -258,9 +258,17 @@ _port_irq_common:
.globl _port_thread_start .globl _port_thread_start
_port_thread_start: _port_thread_start:
#if CH_DBG_SYSTEM_STATE_CHECK #if CH_DBG_SYSTEM_STATE_CHECK
mov r0, #0 #if defined(THUMB_NO_INTERWORKING)
ldr r1, =dbg_lock_cnt add r0, pc, #1
str r0, [r1] bx r0
.code 16
#endif
bl _dbg_check_unlock
#if defined(THUMB_NO_INTERWORKING)
mov lr, pc
bx lr
.code 32
#endif
#endif #endif
msr CPSR_c, #MODE_SYS msr CPSR_c, #MODE_SYS
#if defined(THUMB_NO_INTERWORKING) #if defined(THUMB_NO_INTERWORKING)

View File

@ -159,7 +159,7 @@ static msg_t thread2L(void *p) {
(void)p; (void)p;
chMtxLock(&m1); chMtxLock(&m1);
test_cpu_pulse(40); test_cpu_pulse(40);
chMtxUnlock(); chMtxUnlock(&m1);
test_cpu_pulse(10); test_cpu_pulse(10);
test_emit_token('C'); test_emit_token('C');
return 0; return 0;
@ -182,7 +182,7 @@ static msg_t thread2H(void *p) {
chThdSleepMilliseconds(40); chThdSleepMilliseconds(40);
chMtxLock(&m1); chMtxLock(&m1);
test_cpu_pulse(10); test_cpu_pulse(10);
chMtxUnlock(); chMtxUnlock(&m1);
test_emit_token('A'); test_emit_token('A');
return 0; return 0;
} }
@ -250,7 +250,7 @@ static msg_t thread3LL(void *p) {
(void)p; (void)p;
chMtxLock(&m1); chMtxLock(&m1);
test_cpu_pulse(30); test_cpu_pulse(30);
chMtxUnlock(); chMtxUnlock(&m1);
test_emit_token('E'); test_emit_token('E');
return 0; return 0;
} }
@ -264,9 +264,9 @@ static msg_t thread3L(void *p) {
test_cpu_pulse(20); test_cpu_pulse(20);
chMtxLock(&m1); chMtxLock(&m1);
test_cpu_pulse(10); test_cpu_pulse(10);
chMtxUnlock(); chMtxUnlock(&m1);
test_cpu_pulse(10); test_cpu_pulse(10);
chMtxUnlock(); chMtxUnlock(&m2);
test_emit_token('D'); test_emit_token('D');
return 0; return 0;
} }
@ -278,7 +278,7 @@ static msg_t thread3M(void *p) {
chThdSleepMilliseconds(20); chThdSleepMilliseconds(20);
chMtxLock(&m2); chMtxLock(&m2);
test_cpu_pulse(10); test_cpu_pulse(10);
chMtxUnlock(); chMtxUnlock(&m2);
test_emit_token('C'); test_emit_token('C');
return 0; return 0;
} }
@ -300,7 +300,7 @@ static msg_t thread3HH(void *p) {
chThdSleepMilliseconds(50); chThdSleepMilliseconds(50);
chMtxLock(&m2); chMtxLock(&m2);
test_cpu_pulse(10); test_cpu_pulse(10);
chMtxUnlock(); chMtxUnlock(&m2);
test_emit_token('A'); test_emit_token('A');
return 0; return 0;
} }