This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aplicación detest para but 457 de upstream
Programa para testear el bug 457 ciaa/firmware_v1#457
- Loading branch information
0 parents
commit 3b9e3ca
Showing
10 changed files
with
1,157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
############################################################################### | ||
# | ||
# Copyright 2014, ACSE & CADIEEL | ||
# ACSE : http://www.sase.com.ar/asociacion-civil-sistemas-embebidos/ciaa/ | ||
# CADIEEL: http://www.cadieel.org.ar | ||
# Copyright 2015, Mariano Cerdeiro | ||
# Copyright 2015, Juan Cecconi (Numetron, UTN-FRBA) | ||
# All rights reserved. | ||
# | ||
# This file is part of CIAA Firmware. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from this | ||
# software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
############################################################################### | ||
######################## DO NOT CHANGE THIS FILE ############################## | ||
############################################################################### | ||
# You dont have to change this file, never. | ||
# | ||
# Copy this file to Makefile.mine and set the variables. | ||
# | ||
# Makefile.mine will be included by the root make file but ignored by | ||
# .gitignore. | ||
# | ||
# You can also remove this commentas lines. | ||
# | ||
# Please take into account to check and compare your Makefile.mine every time | ||
# that Makefile.config is updated to be sure that you dont need to define new | ||
# variables. | ||
# | ||
############################################################################### | ||
# ARCH, CPUTYPE and CPU following are supported | ||
# +--------------+---------------+----------------+--------------+---------------+ | ||
# | ARCH | CPUTYPE | CPU | COMPILER | BOARD | | ||
# +--------------+---------------+----------------+--------------+---------------+ | ||
# | x86 | ia32 | | gcc | ciaa_sim_ia32 | | ||
# | | ia64 | | | ciaa_sim_ia64 | | ||
# +--------------+---------------+----------------+--------------+---------------+ | ||
# | cortexM4 | lpc43xx | lpc4337 | gcc | edu_ciaa_nxp | | ||
# | | | | | ciaa_nxp | | ||
# | | k60_120 | mk60fx512vlq15 | gcc | ciaa_fsl | | ||
# +--------------+---------------+----------------+--------------+---------------+ | ||
# | mips | pic32 | pic32mz | gcc | ciaa_pic | | ||
# +--------------+---------------+----------------+--------------+---------------+ | ||
# | ||
# if you define the BOARD the others parameters are optional. | ||
#ARCH ?= x86 | ||
#CPUTYPE ?= ia32 | ||
#CPU ?= none | ||
#COMPILER ?= gcc | ||
# BOARD ?= ciaa_sim_ia32 | ||
# BOARD ?= edu_ciaa_nxp | ||
BOARD ?= ciaa_nxp | ||
############################################################################### | ||
# rtostests options | ||
# | ||
# RTOSTESTS_DEBUG_CTESTS = 1 #, set debug flag in ctest.pl | ||
# RTOSTESTS_CLEAN_GENERATE = 0 #, skips make clean and generate (use it only if you are running a single sub test case, but after generating RTOS at least one time!) | ||
# RTOSTESTS_CTEST = 'ctest_tm_01:Test Sequence 1' #, test case name, based on ctestcases.cfg (use it for single ctest) | ||
# RTOSTESTS_SUBTEST = 'full-preemptive' #, sub test case name, based on ctestcases.cfg or empty to start running from this test to the end | ||
# RTOSTESTS_RAM_EXEC = 1 # Run all the test in RAM saving Flash cycles. | ||
|
||
# Projects | ||
# | ||
# Available projects are: | ||
# examples/adc_dac (example using adc and dac) | ||
# examples/blinking (simple example with rtos and posix) | ||
# examples/blinking_echo (example with rtos and posix) | ||
# examples/blinking_modbus_slave (example with rtos, posix and using modbus slave) | ||
# examples/blinking_modbus_master (example with rtos, posix and using modbus master) | ||
# examples/blinking_lwip (blinking and tcp echo using lwip) | ||
# examples/rtcs_example (example using real time control system module) | ||
# examples/rtos_example (example using rtos) | ||
# | ||
# PROJECT_PATH ?= examples$(DS)blinking_echo | ||
|
||
# PROJECT_PATH ?= examples$(DS)blinking_echo | ||
PROJECT_PATH ?= projects$(DS)blinky_uart_waitevent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Steps for triggering the bug | ||
|
||
|
||
build & transfer the project | ||
|
||
make all | ||
make download | ||
|
||
Use a serial port terminal ask gtkterm or hyperterminal, config the serial port as 115200 8N1 and send a huge file with no interruptions. | ||
|
||
The blinking will stop. | ||
|
||
If wout apply Gustavo Muro's suggested patch ther will be problems, but seems being another cause: | ||
|
||
* apply de patch | ||
|
||
`bash parchar_rtos.sh` | ||
|
||
* Set your target in `Makefile.mine`, if you use an `edu-ciaa-nxp` you will need an UART adapter (rs-232 shifter or a FTDI one) since you | ||
will need transfer ata via `LPC_USART3` UART. In `ciaa-nxp` target this uart is the RS232 DB9 port. | ||
* make all && make download | ||
* From your computer transfer a huge file via FTDI UART and transfer a huge file via RS232 UART. | ||
* Wait a - very large - period of time until leds `LED2` and `LEDB` stop blinking. This is the error. | ||
* If you stop and start again the data transfer via `LPC_USART2` uart the ISR led blinks but not the task related via WaitEvent. | ||
|
||
# Considerations | ||
|
||
See the code for understanding the LED1, LED2 and LED3 indication. | ||
|
||
The test project is made for edu-ciaa-nxp, but can with ciaa-nxp with output limitations, since digital outputs 0-3 are relays. | ||
|
||
The files `projects/blinky_uart_waitevent/inc/ciaaUART.h` `projects/blinky_uart_waitevent/inc/ciaaIO.h` | ||
`projects/blinky_uart_waitevent/src/ciaaIO.c` `projects/blinky_uart_waitevent/src/ciaaUART.c` were taken from | ||
firmware v2 https://github.com/ciaa/firmware_v2/ and adapted to this enviroment. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
/* Copyright 2014, Mariano Cerdeiro */ | ||
/* Copyright 2014, Pablo Ridolfi */ | ||
/* Copyright 2014, Juan Cecconi */ | ||
/* Copyright 2014, Gustavo Muro */ | ||
/* */ | ||
/* This file is part of CIAA Firmware. */ | ||
/* */ | ||
/* Redistribution and use in source and binary forms, with or without */ | ||
/* modification, are permitted provided that the following conditions are */ | ||
/* met: */ | ||
/* */ | ||
/* 1. Redistributions of source code must retain the above copyright notice, */ | ||
/* this list of conditions and the following disclaimer. */ | ||
/* */ | ||
/* 2. Redistributions in binary form must reproduce the above copyright */ | ||
/* notice, this list of conditions and the following disclaimer in the */ | ||
/* documentation and/or other materials provided with the distribution. */ | ||
/* */ | ||
/* 3. Neither the name of the copyright holder nor the names of its */ | ||
/* contributors may be used to endorse or promote products derived from */ | ||
/* this software without specific prior written permission. */ | ||
/* */ | ||
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ | ||
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */ | ||
/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A */ | ||
/* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER */ | ||
/* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ | ||
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, */ | ||
/* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */ | ||
/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ | ||
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ | ||
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ | ||
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | ||
/* */ | ||
/*****************************************************************************/ | ||
/* Blinking example OIL configuration file */ | ||
/* */ | ||
/* This file describes the current OSEK configuration. */ | ||
/* References: */ | ||
/* - OSEK OS standard: http://portal.osek-vdx.org/files/pdf/specs/os223.pdf */ | ||
/* - OSEK OIL standard: http://portal.osek-vdx.org/files/pdf/specs/oil25.pdf*/ | ||
/*****************************************************************************/ | ||
|
||
OSEK OSEK { | ||
|
||
OS ExampleOS { | ||
STATUS = EXTENDED; | ||
ERRORHOOK = TRUE; | ||
PRETASKHOOK = FALSE; | ||
POSTTASKHOOK = FALSE; | ||
STARTUPHOOK = FALSE; | ||
SHUTDOWNHOOK = FALSE; | ||
USERESSCHEDULER = FALSE; | ||
MEMMAP = FALSE; | ||
}; | ||
|
||
|
||
APPMODE = AppMode1; | ||
|
||
TASK InitTask { | ||
PRIORITY = 1; | ||
ACTIVATION = 1; | ||
AUTOSTART = TRUE { | ||
APPMODE = AppMode1; | ||
} | ||
STACK = 512; | ||
TYPE = EXTENDED; | ||
SCHEDULE = NON; | ||
} | ||
|
||
|
||
TASK BlinkTask1 { | ||
PRIORITY = 3; | ||
ACTIVATION = 1; | ||
STACK = 512; | ||
TYPE = EXTENDED; | ||
EVENT = TESTW; | ||
SCHEDULE = NON; | ||
} | ||
|
||
TASK BlinkTask2 { | ||
PRIORITY = 2; | ||
ACTIVATION = 1; | ||
STACK = 512; | ||
TYPE = EXTENDED; | ||
EVENT = TESTW; | ||
SCHEDULE = NON; | ||
} | ||
|
||
TASK WaitTask3 { | ||
PRIORITY = 1; | ||
ACTIVATION = 1; | ||
STACK = 512; | ||
TYPE = EXTENDED; | ||
EVENT = TESTW; | ||
SCHEDULE = FULL; | ||
/* SCHEDULE = NON; usando NON Preemptive el sistema funciona correctamente */ | ||
} | ||
|
||
TASK WaitTask4 { | ||
PRIORITY = 1; | ||
ACTIVATION = 1; | ||
STACK = 512; | ||
TYPE = EXTENDED; | ||
EVENT = TESTW; | ||
SCHEDULE = FULL; | ||
/* SCHEDULE = NON; usando NON Preemptive el sistema funciona correctamente */ | ||
} | ||
|
||
EVENT = TESTW; | ||
|
||
ALARM ActivateBlinkTask1 { | ||
COUNTER = HardwareCounter; | ||
ACTION = ACTIVATETASK { | ||
TASK = BlinkTask1 | ||
} | ||
} | ||
|
||
ALARM ActivateBlinkTask2 { | ||
COUNTER = HardwareCounter; | ||
ACTION = ACTIVATETASK { | ||
TASK = BlinkTask2; | ||
} | ||
} | ||
|
||
|
||
COUNTER HardwareCounter { | ||
MAXALLOWEDVALUE = 1000; | ||
TICKSPERBASE = 1; | ||
MINCYCLE = 1; | ||
TYPE = HARDWARE; | ||
COUNTER = HWCOUNTER0; | ||
}; | ||
|
||
ISR UART2_IRQHandler { | ||
INTERRUPT = UART2; | ||
CATEGORY = 2; | ||
/* CATEGORY = 1; usando category 1 también falla el programa */ | ||
PRIORITY = 0; | ||
}; | ||
|
||
ISR UART3_IRQHandler { | ||
INTERRUPT = UART3; | ||
CATEGORY = 2; | ||
/* CATEGORY = 1; usando category 1 también falla el programa */ | ||
PRIORITY = 0; | ||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* Copyright 2014, Mariano Cerdeiro | ||
* Copyright 2014, Pablo Ridolfi | ||
* Copyright 2014, Juan Cecconi | ||
* Copyright 2014, Gustavo Muro | ||
* | ||
* This file is part of CIAA Firmware. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from this | ||
* software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
*/ | ||
|
||
#ifndef _RTOS_EXAMPLE_H_ | ||
#define _RTOS_EXAMPLE_H_ | ||
/** \brief rtos example header file | ||
** | ||
** This is a mini example of the CIAA Firmware which only uses the rtos. | ||
** | ||
**/ | ||
|
||
/** \addtogroup CIAA_Firmware CIAA Firmware | ||
** @{ */ | ||
/** \addtogroup Examples CIAA Firmware Examples | ||
** @{ */ | ||
/** \addtogroup RTOS rtos example source file | ||
** @{ */ | ||
|
||
/* | ||
* Initials Name | ||
* --------------------------- | ||
* MaCe Mariano Cerdeiro | ||
*/ | ||
|
||
/* | ||
* modification history (new versions first) | ||
* ----------------------------------------------------------- | ||
* 20141221 v0.0.1 initials initial version | ||
*/ | ||
|
||
/*==================[inclusions]=============================================*/ | ||
|
||
/*==================[macros]=================================================*/ | ||
|
||
/*==================[typedef]================================================*/ | ||
|
||
/*==================[external data declaration]==============================*/ | ||
|
||
/*==================[external functions declaration]=========================*/ | ||
|
||
/** @} doxygen end group definition */ | ||
/** @} doxygen end group definition */ | ||
/** @} doxygen end group definition */ | ||
/*==================[end of file]============================================*/ | ||
#endif /* #ifndef _RTOS_EXAMPLE_H_ */ | ||
|
Oops, something went wrong.