Skip to content

Commit 12f33a4

Browse files
committed
Example files moved to base directory. Added template for socketCAN drivers (based on BECK SC 243)
1 parent 8104f87 commit 12f33a4

29 files changed

+3010
-1536
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
canopennode
22
*.o
33

4+
doc/
5+
6+
#eclipse
7+
.cproject
8+
.project
9+
.settings/
10+

example/CANopen.c CANopen.c

File renamed without changes.

example/CANopen.h CANopen.h

File renamed without changes.

example/CO_OD.c CO_OD.c

File renamed without changes.

example/CO_OD.h CO_OD.h

File renamed without changes.

Doxyfile

+1,878-1,431
Large diffs are not rendered by default.

example/IO.eds IO.eds

File renamed without changes.

COPYING.LESSER.txt LICENSE

File renamed without changes.

example/Makefile Makefile

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Makefile for CANopenNode, basic compile with no CAN device.
22

33

4-
STACK_SRC = ../stack
5-
STACKDRV_SRC = ../stack/drvTemplate
4+
STACK_SRC = stack
5+
STACKDRV_SRC = stack/drvTemplate
66

77

88
INCLUDE_DIRS = $(STACK_SRC) \
@@ -30,14 +30,16 @@ CC = gcc
3030
CFLAGS = -Wall -I$(INCLUDE_DIRS)
3131

3232

33+
.PHONY: all clean
34+
35+
all: canopennode
36+
37+
clean:
38+
rm -f $(OBJS) canopennode
39+
3340
%.o: %.c
3441
$(CC) $(CFLAGS) -c -o $*.o $<
3542

36-
3743
canopennode: $(OBJS)
3844
$(CC) $(CFLAGS) $(OBJS) -o canopennode
3945

40-
41-
clean:
42-
rm -f $(OBJS) canopennode
43-

README

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
CANopenNode is an opensource CANopen Stack.
2+
3+
CANopen is the internationally standardized (EN 50325-4) CAN-based higher-layer protocol for embedded control system. For more information on CANopen see http://www.can-cia.org/
4+
5+
Stack is written in ANSI C in object-oriented way. Code is documented. License is LGPL V2.1.
6+
7+
Variables (communication, device, custom) are ordered in CANopen object dictionary and are accessible from both: C code and from CAN network.
8+
9+
10+
CANopen Features:
11+
- NMT slave to start, stop, reset device.
12+
- Heartbeat producer/consumer error control.
13+
- PDO linking and dynamic mapping for fast exchange of process variables.
14+
- SDO expedited, segmented and block transfer for service access to all parameters.
15+
- SDO master.
16+
- Emergency message.
17+
- Sync producer/consumer.
18+
- Nonvolatile storage.
19+
20+
21+
Supported microcontrollers:
22+
- Template for new microcontroller support for CANopenNode:
23+
- Contributed by Janez Paternoster
24+
- Status:
25+
- Well commented.
26+
- Should compile on any system.
27+
- No interface to any CAN hardware.
28+
- Template for parameter storage via objects 0x1010 and 0x1011.
29+
30+
- Linux socketCAN:
31+
- Contributed by Janez Paternoster
32+
- Status:
33+
- ...
34+
35+
- eCos RTOS:
36+
- The driver supports any hardware that is supported by the eCos CAN framework.
37+
See http://ecos.sourceware.org/
38+
- Contributed by Uwe Kindler:
39+
- See: http://sourceforge.net/p/canopennode/discussion/387151/thread/7603e3b5/
40+
- Tested (sep 2013):
41+
- Olimex LCP-E2294-1MB board: https://www.olimex.com/Products/ARM/NXP/LPC-E2294-1MB/
42+
- Olimex LPC-L2294-1MB board: https://www.olimex.com/Products/ARM/NXP/LPC-L2294-1MB/
43+
- Status:
44+
- stable.
45+
- Parameter storage via objects 0x1010 and 0x1011 (eCos generic flash support).
46+
47+
- Microchip PIC32MX:
48+
- Contributed by Janez Paternoster
49+
- Tested (date):
50+
-
51+
- Status:
52+
- Stable.
53+
- Parameter storage via objects 0x1010 and 0x1011 (external eeprom).
54+
55+
- Microchip PIC24H and dsPIC33F:
56+
- Contributed by Janez Paternoster
57+
- Tested (date):
58+
-
59+
- Status:
60+
- stable/unconfirmed
61+
62+
- Microchip dsPIC30F:
63+
- Contributed by Janez Paternoster
64+
- Tested (?):
65+
66+
- NXP LPC177x (Cortex M3) and FreeRTOS.
67+
- Contributed by AmitH(sourceforge) (17.9.2014):
68+
- See: http://sourceforge.net/p/canopennode/discussion/387151/thread/d1b43992
69+
- Status:
70+
- unconfirmed
71+
72+
- Atmel SAM3X:
73+
- Used with Atmel ASF library.
74+
- Contributed by Olof Larsson (dec 2014):
75+
- See: http://sourceforge.net/p/canopennode/discussion/387151/thread/8e789d60/
76+
- Status:
77+
- unconfirmed
78+
79+
- ST STM32:
80+
- Contributed by ?
81+
- Status:
82+
- unknown
83+
84+
85+
Other known implementations with source code:
86+
- AD ADSP-CM408 mixed signal controller
87+
- http://www.analog.com/en/processors-dsp/cm4xx/adsp-cm408f/products/cm40x-ez/eb.html
88+
- Contributed by Analog devices, Inc. (dec 2014):
89+
- See: http://sourceforge.net/p/canopennode/discussion/387151/thread/bfbcab97/
90+
- Package and setup user guide are available at:
91+
- http://sourceforge.net/projects/canopennode-for-adsp-cm408f/
92+
- http://sourceforge.net/projects/canopennode-for-adsp-cm408f/files
93+
94+
95+
Discontinued implementations from earlier versions of CANopenNode:
96+
- Microchip PIC18F
97+
- BECK IPC Embedded Web-Controller SC243
98+
99+
100+
History of the project:
101+
Project was initially hosted on http://sourceforge.net/projects/canopennode/
102+
It started in 2004 with PIC18F microcontrollers from Microchip.
103+
Fresh, cleaned repository of CANopenNode stack started on 25.7.2015.
104+
For older history see http://sourceforge.net/p/canopennode/code_complete/
105+

Readme.txt

-31
This file was deleted.
File renamed without changes.

example/_project.xml _project.xml

File renamed without changes.

example/main.c main.c

File renamed without changes.

stack/LPC177x_8x/readme.txt

-5
This file was deleted.

stack/PIC24H_dsPIC33F/readme.txt

-5
This file was deleted.

stack/PIC32/readme.txt

-7
This file was deleted.

stack/SAM3X/readme.txt

-7
This file was deleted.

stack/STM32/CO_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* CAN module object for Microchip STM32F103 microcontroller.
2+
* CAN module object for ST STM32F103 microcontroller.
33
*
44
* @file CO_driver.c
55
* @author Janez Paternoster

stack/STM32/CO_driver.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* CAN module object for Microchip STM32F103 microcontroller.
2+
* CAN module object for ST STM32F103 microcontroller.
33
*
44
* @file CO_driver.h
55
* @author Janez Paternoster

stack/STM32/readme.txt

-6
This file was deleted.

stack/drvTemplate/eeprom.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
*/
4242
static CO_SDO_abortCode_t CO_ODF_1010(CO_ODF_arg_t *ODF_arg);
4343
static CO_SDO_abortCode_t CO_ODF_1010(CO_ODF_arg_t *ODF_arg){
44-
CO_EE_t *ee;
44+
//CO_EE_t *ee;
4545
uint32_t value;
4646
CO_SDO_abortCode_t ret = CO_SDO_AB_NONE;
4747

48-
ee = (CO_EE_t*) ODF_arg->object;
48+
//ee = (CO_EE_t*) ODF_arg->object;
4949
value = CO_getUint32(ODF_arg->data);
5050

5151
if(!ODF_arg->reading){
@@ -78,11 +78,11 @@ static CO_SDO_abortCode_t CO_ODF_1010(CO_ODF_arg_t *ODF_arg){
7878
*/
7979
static CO_SDO_abortCode_t CO_ODF_1011(CO_ODF_arg_t *ODF_arg);
8080
static CO_SDO_abortCode_t CO_ODF_1011(CO_ODF_arg_t *ODF_arg){
81-
CO_EE_t *ee;
81+
//CO_EE_t *ee;
8282
uint32_t value;
8383
CO_SDO_abortCode_t ret = CO_SDO_AB_NONE;
8484

85-
ee = (CO_EE_t*) ODF_arg->object;
85+
//ee = (CO_EE_t*) ODF_arg->object;
8686
value = CO_getUint32(ODF_arg->data);
8787

8888
if(!ODF_arg->reading){

stack/drvTemplate/readme.txt

-9
This file was deleted.

stack/dsPIC30F/readme.txt

-5
This file was deleted.

stack/eCos/readme.txt

-17
This file was deleted.

0 commit comments

Comments
 (0)