Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desmakers 2827 enable kit xmc14 2go into arduino ide #259

Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
53567f4
Initialize pin mapping file based on xmc1100 2go
LinjingZhang Nov 16, 2023
d7da5b2
initialize xmc1400 2Go boards
LinjingZhang Nov 16, 2023
3af21ec
investigate and chege pin setting for PWM, ADC and start to change UART
LinjingZhang Nov 24, 2023
51b5b2b
update flasher related parameter
LinjingZhang Nov 27, 2023
ae376a4
- add xmc1400 2Go to index json
LinjingZhang Nov 27, 2023
47281d6
Merge pull request #1 from LinjingZhang/DESMAKERS-2827-enable-kit_xmc…
LinjingZhang Nov 28, 2023
4748bb2
delete unnecessary define
LinjingZhang Nov 29, 2023
f0ffd43
update .yml for test build
LinjingZhang Nov 29, 2023
abeca54
Merge remote-tracking branch 'origin/master' into DESMAKERS-2827-enab…
LinjingZhang Nov 29, 2023
0911b93
update UART configuration and Interrupt
LinjingZhang Nov 29, 2023
0bf959a
update SPI configuration
LinjingZhang Nov 29, 2023
be9c587
add a macro for compilation
LinjingZhang Nov 29, 2023
843c1a5
Add I2C config and interrupts
LinjingZhang Nov 30, 2023
df5927e
delete empty space
LinjingZhang Nov 30, 2023
bd7a7b8
add I2S config
LinjingZhang Nov 30, 2023
d73479e
fix macro
LinjingZhang Nov 30, 2023
3ef7323
fix: change the flashsize
LinjingZhang Dec 4, 2023
ce5e3c6
test cicd
LinjingZhang Dec 4, 2023
269a271
temp: change the index.json url
LinjingZhang Dec 4, 2023
575c935
fix wrong pin for debug
LinjingZhang Dec 6, 2023
e3104d9
add temporary dev readme file for local test
LinjingZhang Dec 8, 2023
a24197b
update yaml file
LinjingZhang Dec 12, 2023
3a26c65
- remove checkout step
LinjingZhang Dec 13, 2023
a0824fb
fix checkout library test example error
LinjingZhang Dec 13, 2023
c8d0a8d
remove stackMem test exapmle
LinjingZhang Dec 13, 2023
98d546f
choose different result register for ADC channels
LinjingZhang Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/compile-platform-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ jobs:
multiSerial: true
dma: true
alarmRtc: true
- fqbn: Infineon:xmc:XMC1400_XMC2GO
i2s: true
dieTemp: true
heapMem: true
sleep1100: true
sleep4700 : false
stackMem: true
dma: false
alarmRtc: false
- fqbn: Infineon:xmc:XMC1400_Arduino_Kit
i2s: false
dieTemp: true
Expand Down Expand Up @@ -149,7 +158,7 @@ jobs:
platforms: |
# Use Boards Manager to install the latest release of the platform to get the toolchain.
- name: Infineon:xmc
source-url: https://github.com/Infineon/XMC-for-Arduino/releases/latest/download/package_infineon_index.json
source-url: https://github.com/LinjingZhang/XMC-for-Arduino/releases/download/2.2.1/package_infineon_index_linjing_test.json
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not work because you are renaming the .json file.
As the preference configuration is meant to use "package_infineon_index.json" your file would not be find any board. You can give it a try to change that file name in your releases and update then correrspondingly the yml file.
Basically, only the repo owner in the url should be changed : "Infineon" for "LinjingZhang" if you upload the modified json to your latest release in your fork.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow error solved:

  1. Change index.json file name
  2. Manual adapt files for release
  3. For arduino/compile-sketches@v1, disable 'enable-deltas-report'
  4. Some test is not compatible (e.g. stackMem, linker script changed)


- source-path: ./
name: Infineon:xmc
Expand Down
21 changes: 21 additions & 0 deletions IFX_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[![Build Status](https://travis-ci.org/Infineon/XMC-for-Arduino.svg?branch=master)](https://travis-ci.org/Infineon/XMC-for-Arduino)
# Infineon's XMC Microcontroller Boards for Arduino

## Local test (**ON WINDOWS**):

### Clone the repository in arduino folder
- Open Arduino and install any Infineon XMC library (e.g. 2.2.0)
- Open the library location in Arduino program folder

`C:\Users\USERNAME\AppData\Local\Arduino15\packages\Infineon\hardware\xmc`

- Open git bash, type command:

`git clone "HTTP_SSH_REPOSITORY" "LIBRARY_VERSION (e.g. 2.2.0)"`

### Add JLink path to flasher (quick fix)
- Open `tools/xmc-flasher.py`
- Change line 14
`jlinkexe = 'JLINK_EXE_PATH (e.g. C:/Program Files/SEGGER/JLink/JLink.exe)'`

Refer to the main README for the rest of the usage.
44 changes: 44 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,50 @@ XMC1300_Boot_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
XMC1300_Boot_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
XMC1300_Boot_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN

####################################################
XMC1400_XMC2GO.name=XMC1400 XMC2GO
XMC1400_XMC2GO.upload.tool=xmcflasher
XMC1400_XMC2GO.upload.speed=115200
XMC1400_XMC2GO.upload.resetmethod=ck
XMC1400_XMC2GO.upload.maximum_size=65536
XMC1400_XMC2GO.upload.wait_for_upload_port=true

XMC1400_XMC2GO.communication=usb
XMC1400_XMC2GO.protocol=dragon_isp
XMC1400_XMC2GO.program.protocol=dragon_isp
XMC1400_XMC2GO.program.tool=xmcflasher
XMC1400_XMC2GO.program.extra_params=-Pusb

XMC1400_XMC2GO.serial.disableDTR=true
XMC1400_XMC2GO.serial.disableRTS=true

XMC1400_XMC2GO.build.mcu=cortex-m0
XMC1400_XMC2GO.build.f_cpu=48000000L
XMC1400_XMC2GO.build.board=ARM_XMC
XMC1400_XMC2GO.build.board.version=1402
XMC1400_XMC2GO.build.board.type=Q040x0200
XMC1400_XMC2GO.build.board.v=0200
XMC1400_XMC2GO.build.core=./
XMC1400_XMC2GO.build.variant=XMC1400
XMC1400_XMC2GO.build.board_variant=XMC1400_XMC2GO
XMC1400_XMC2GO.build.flash_size=200K
XMC1400_XMC2GO.build.flash_ld=linker_script_200k.ld
XMC1400_XMC2GO.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES

XMC1400_XMC2GO.menu.UART.debug=PC
XMC1400_XMC2GO.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC
XMC1400_XMC2GO.menu.UART.onBoard=On Board
XMC1400_XMC2GO.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD

XMC1400_XMC2GO.menu.LIB.NONE=None
XMC1400_XMC2GO.menu.LIB.NONE.library.selected=
XMC1400_XMC2GO.menu.LIB.NN=ARM NN Framework
XMC1400_XMC2GO.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN
XMC1400_XMC2GO.menu.LIB.DSP=ARM DSP
XMC1400_XMC2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
XMC1400_XMC2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
XMC1400_XMC2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN

####################################################
XMC1400_Arduino_Kit.name=XMC1400 Kit for Arduino
XMC1400_Arduino_Kit.upload.tool=xmcflasher
Expand Down
2 changes: 1 addition & 1 deletion cores/WInterrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void attachInterrupt(uint32_t interrupt_num, interrupt_cb_t callback, uint32_t m

if (pin_irq.irq_num == 0)
{
#if defined(XMC1100_Boot_Kit) || defined(XMC1400_Arduino_Kit)
#if defined(XMC1100_Boot_Kit) || defined(XMC1400_Arduino_Kit) || defined(XMC1400_XMC2GO)
/* P1_4 external interrupt goes through USIC to CCU4 */
XMC_USIC_CH_Enable(XMC_USIC0_CH0);
XMC_USIC_CH_SetInputSource(XMC_USIC0_CH0, XMC_USIC_CH_INPUT_DX5, USIC0_C0_DX5_P1_4);
Expand Down
3 changes: 3 additions & 0 deletions package/package_infineon_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
{
"name":"XMC1400 Kit for Arduino"
},
{
"name":"XMC1400 XMC2Go"
},
{
"name":"XMC4200 Platform 2Go"
},
Expand Down
Loading