git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13707 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
08bfb4cc59
commit
ce66e0a202
|
@ -51,4 +51,5 @@
|
||||||
<resource resourceType="PROJECT" workspacePath="/RT-STM32L476RG-NUCLEO"/>
|
<resource resourceType="PROJECT" workspacePath="/RT-STM32L476RG-NUCLEO"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
</cproject>
|
</cproject>
|
||||||
|
|
|
@ -13,11 +13,11 @@ all:
|
||||||
@echo ====================================================================
|
@echo ====================================================================
|
||||||
@echo
|
@echo
|
||||||
@echo === Building for STM32L476-Discovery ===============================
|
@echo === Building for STM32L476-Discovery ===============================
|
||||||
+@make --no-print-directory -f ./make/stm32l476_discovery.make all
|
@make --no-print-directory -f ./make/stm32l476_discovery.make all
|
||||||
@echo ====================================================================
|
@echo ====================================================================
|
||||||
@echo
|
@echo
|
||||||
@echo === Building for STM32L4R5ZI-Nucleo144 =============================
|
@echo === Building for STM32L4R5ZI-Nucleo144 =============================
|
||||||
+@make --no-print-directory -f ./make/stm32l4r5zi_nucleo144.make all
|
@make --no-print-directory -f ./make/stm32l4r5zi_nucleo144.make all
|
||||||
@echo ====================================================================
|
@echo ====================================================================
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ clean:
|
||||||
@echo
|
@echo
|
||||||
-@make --no-print-directory -f ./make/stm32h743_nucleo144.make clean
|
-@make --no-print-directory -f ./make/stm32h743_nucleo144.make clean
|
||||||
@echo
|
@echo
|
||||||
+@make --no-print-directory -f ./make/stm32l476_discovery.make clean
|
-@make --no-print-directory -f ./make/stm32l476_discovery.make clean
|
||||||
@echo
|
@echo
|
||||||
+@make --no-print-directory -f ./make/stm32l4r5zi_nucleo144.make clean
|
-@make --no-print-directory -f ./make/stm32l4r5zi_nucleo144.make clean
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -82,11 +82,9 @@ static thread_t *threads[IRQ_STORM_CFG_NUM_THREADS];
|
||||||
* Test worker threads.
|
* Test worker threads.
|
||||||
*/
|
*/
|
||||||
static THD_FUNCTION(irq_storm_thread, arg) {
|
static THD_FUNCTION(irq_storm_thread, arg) {
|
||||||
static volatile unsigned x = 0;
|
|
||||||
static unsigned cnt = 0;
|
static unsigned cnt = 0;
|
||||||
unsigned me = (unsigned)arg;
|
unsigned me = (unsigned)arg;
|
||||||
unsigned target;
|
unsigned target;
|
||||||
unsigned r;
|
|
||||||
msg_t msg;
|
msg_t msg;
|
||||||
|
|
||||||
chRegSetThreadName("irq_storm");
|
chRegSetThreadName("irq_storm");
|
||||||
|
@ -100,6 +98,9 @@ static THD_FUNCTION(irq_storm_thread, arg) {
|
||||||
#if IRQ_STORM_CFG_RANDOMIZE != FALSE
|
#if IRQ_STORM_CFG_RANDOMIZE != FALSE
|
||||||
/* Pseudo-random delay.*/
|
/* Pseudo-random delay.*/
|
||||||
{
|
{
|
||||||
|
static volatile unsigned x = 0;
|
||||||
|
unsigned r;
|
||||||
|
|
||||||
chSysLock();
|
chSysLock();
|
||||||
r = rand() & 15;
|
r = rand() & 15;
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
|
@ -107,12 +108,7 @@ static THD_FUNCTION(irq_storm_thread, arg) {
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#else /* IRQ_STORM_CFG_RANDOMIZE == FALSE */
|
#else /* IRQ_STORM_CFG_RANDOMIZE == FALSE */
|
||||||
/* Fixed delay.*/
|
/* No delay.*/
|
||||||
{
|
|
||||||
r = me >> 4;
|
|
||||||
while (r--)
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
#endif /* IRQ_STORM_CFG_RANDOMIZE == FALSE */
|
#endif /* IRQ_STORM_CFG_RANDOMIZE == FALSE */
|
||||||
|
|
||||||
/* Deciding in which direction to re-send the message.*/
|
/* Deciding in which direction to re-send the message.*/
|
||||||
|
|
|
@ -33,22 +33,6 @@
|
||||||
/* Module pre-compile time settings. */
|
/* Module pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#ifndef RANDOMIZE
|
|
||||||
#define RANDOMIZE FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ITERATIONS
|
|
||||||
#define ITERATIONS 100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NUM_THREADS
|
|
||||||
#define NUM_THREADS 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAILBOX_SIZE
|
|
||||||
#define MAILBOX_SIZE 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Configuration options
|
* @name Configuration options
|
||||||
* @{
|
* @{
|
||||||
|
@ -71,7 +55,7 @@
|
||||||
* @brief Number of storm threads.
|
* @brief Number of storm threads.
|
||||||
*/
|
*/
|
||||||
#if !defined(IRQ_STORM_CFG_NUM_THREADS) || defined(__DOXYGEN__)
|
#if !defined(IRQ_STORM_CFG_NUM_THREADS) || defined(__DOXYGEN__)
|
||||||
#define IRQ_STORM_CFG_NUM_THREADS 4
|
#define IRQ_STORM_CFG_NUM_THREADS 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue