Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
047b701a
Commit
047b701a
authored
Jun 11, 2014
by
Theodor-Adrian Stana
Committed by
Matthieu Cattin
Sep 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: FreeRTOS blinky up and running
Signed-off-by:
Theodor Stana
<
t.stana@cern.ch
>
parent
4ac68759
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
7 deletions
+57
-7
Makefile
sw/freertos_blink/armgcc/Makefile
+3
-1
efm32_stlink2.cfg
sw/freertos_blink/openocd/efm32_stlink2.cfg
+42
-0
init.cfg
sw/freertos_blink/openocd/init.cfg
+4
-0
main.c
sw/freertos_blink/src/main.c
+8
-6
No files found.
sw/freertos_blink/armgcc/Makefile
View file @
047b701a
...
...
@@ -11,6 +11,8 @@
DEVICE
=
EFM32GG330F1024
PROJECTNAME
=
freertos_blink
# Name of interface configuration file used by OpenOCD
OOCD_IFACE
?=
stlink-v2-1
OBJ_DIR
=
build
EXE_DIR
=
exe
...
...
@@ -210,7 +212,7 @@ ifeq ($(filter $(MAKECMDGOALS),all debug release),)
endif
flash
:
$(EXE_DIR)/$(PROJECTNAME).bin
openocd
-s
./openocd
-f
interface/
$(OOCD_IFACE)
.cfg
-f
init.cfg
-c
"program
$(EXE_DIR)
/
$(PROJECTNAME)
.bin 0 verify reset"
openocd
-s
.
.
/openocd
-f
interface/
$(OOCD_IFACE)
.cfg
-f
init.cfg
-c
"program
$(EXE_DIR)
/
$(PROJECTNAME)
.bin 0 verify reset"
# include auto-generated dependency files (explicit rules)
ifneq
(clean,$(findstring
clean,
$(MAKECMDGOALS)))
...
...
sw/freertos_blink/openocd/efm32_stlink2.cfg
0 → 100644
View file @
047b701a
#
# efm32 stlink pseudo target
#
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME efm32
}
# Work-area is a space in RAM used for flash programming
# By default use 2kB
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x800
}
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x2ba01477
}
# EFM32 MCUs only support SWD interface
set _TRANSPORT hla_swd
transport select $_TRANSPORT
hla newtap $_CHIPNAME cpu -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME hla_target -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x10000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME efm32 0 0 0 0 $_TARGETNAME
# if srst is not fitted use SYSRESETREQ to
# perform a soft reset
# cortex_m reset_config sysresetreq
sw/freertos_blink/openocd/init.cfg
0 → 100644
View file @
047b701a
source [find efm32_stlink2.cfg]
init
flash probe 0
sw/freertos_blink/src/main.c
View file @
047b701a
...
...
@@ -83,14 +83,12 @@ static void LedBlink(void *pParameters)
*****************************************************************************/
int
main
(
void
)
{
int
i
;
int
i
;
/* Chip errata */
CHIP_Init
();
/* Setup SysTick Timer for 1 msec interrupts */
if
(
SysTick_Config
(
CMU_ClockFreqGet
(
cmuClock_CORE
)
/
1000
))
while
(
1
);
/* Enable clocks */
CMU_ClockEnable
(
cmuClock_HFPER
,
true
);
CMU_ClockEnable
(
cmuClock_GPIO
,
true
);
...
...
@@ -106,12 +104,16 @@ int main(void)
#endif
/* Parameters value for taks*/
static
TaskParams_t
parametersToTask1
=
{
1000
/
portTICK_RATE_MS
,
1
};
static
TaskParams_t
parametersToTask2
=
{
500
/
portTICK_RATE_MS
,
2
};
static
TaskParams_t
parametersToTask1
=
{
500
/
portTICK_RATE_MS
,
1
};
static
TaskParams_t
parametersToTask2
=
{
250
/
portTICK_RATE_MS
,
2
};
static
TaskParams_t
parametersToTask3
=
{
125
/
portTICK_RATE_MS
,
3
};
static
TaskParams_t
parametersToTask4
=
{
62
/
portTICK_RATE_MS
,
4
};
/*Create two task for blinking leds*/
xTaskCreate
(
LedBlink
,
(
const
signed
char
*
)
"LedBlink1"
,
STACK_SIZE_FOR_TASK
,
&
parametersToTask1
,
TASK_PRIORITY
,
NULL
);
xTaskCreate
(
LedBlink
,
(
const
signed
char
*
)
"LedBlink2"
,
STACK_SIZE_FOR_TASK
,
&
parametersToTask2
,
TASK_PRIORITY
,
NULL
);
xTaskCreate
(
LedBlink
,
(
const
signed
char
*
)
"LedBlink3"
,
STACK_SIZE_FOR_TASK
,
&
parametersToTask3
,
TASK_PRIORITY
,
NULL
);
xTaskCreate
(
LedBlink
,
(
const
signed
char
*
)
"LedBlink4"
,
STACK_SIZE_FOR_TASK
,
&
parametersToTask4
,
TASK_PRIORITY
,
NULL
);
/*Start FreeRTOS Scheduler*/
vTaskStartScheduler
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment