{"id":13423280,"url":"https://github.com/david-sawatzke/xmc1100-hal","last_synced_at":"2025-06-24T03:06:56.936Z","repository":{"id":45156435,"uuid":"164832652","full_name":"david-sawatzke/xmc1100-hal","owner":"david-sawatzke","description":"Rust hal for xmc1100 MCUs","archived":false,"fork":false,"pushed_at":"2022-01-04T17:57:05.000Z","size":59,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T08:41:03.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/david-sawatzke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-09T09:35:00.000Z","updated_at":"2024-10-06T12:38:35.000Z","dependencies_parsed_at":"2022-08-31T02:40:21.419Z","dependency_job_id":null,"html_url":"https://github.com/david-sawatzke/xmc1100-hal","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-sawatzke%2Fxmc1100-hal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-sawatzke%2Fxmc1100-hal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-sawatzke%2Fxmc1100-hal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-sawatzke%2Fxmc1100-hal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-sawatzke","download_url":"https://codeload.github.com/david-sawatzke/xmc1100-hal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243750478,"owners_count":20342066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T00:00:27.686Z","updated_at":"2025-03-15T15:30:53.124Z","avatar_url":"https://github.com/david-sawatzke.png","language":"Rust","funding_links":[],"categories":["HAL implementation crates"],"sub_categories":["XMC"],"readme":"# xmc1100-hal\n\nA hal for xmc1100 chips, primarily intended for the XMC2GO kit. Large portions\nof this hal are based on the\n[_stm32f0xx-hal_](https://github.com/stm32-rs/stm32f0xx-hal) hal.\n\n## Flashing\n\nThe XMC2Go includes a JLink debug probe. That means can either use the segger\ntools from https://segger.com or [openocd](http://openocd.org/).\nAdditionally also install arm-none-eabi-gdb. I am using openocd here.\n\nFirst you need to start openocd\n\n``` sh\n$ openocd\n```\n\nThe start gdb with the required elf file\n\n``` sh\n$ arm-none-eabi-gdb \u003cYourElfFile\u003e\n```\n\nAnd finally, connect to the gdb server and flash the chip in gdb\n\n``` gdb\n(gdb) target extended-remote localhost:3333\n(gdb) load\n(gdb) c\n```\n\n## FAQ\n- My serial communication corrupts/returns errors/etc. Why?\n\n  The internal clock doesn't seem to be great. On the xmc2go, this can lead to\n  timing errors. You can also observe these in the arduino implementation with\n  high baudrates (115200 baud), although they don't error out\n\n- Why do interrupts not work?\n\n  After flashing with openocd, interrupts don't work (for me). When I powercycle\n  the board they work again\n## Interrupts/Exceptions\n[Rant time]\n\nThe xmc1100 chips have a highly unusual exception architecture, which isn't really\ncompatible with the normal, pretty great, cortex-m style.\n\n(for reference, flash starts at 0x10001000, while ram start at 0x20000000)\n\nThe vector table is located in rom, which means it's not in flash and thus not\nconfigurable (2-30 in reference manual). At startup, rom code gets executed and\nthen jump to the address defined at 0x10001004 with a sp in 0x10001000 (so far\nso good).\n\nBut other entries are not used. The vector table in rom hard-codes the handler\naddresses in ram and handlers have to be there (like in the avrs or 8051s) at\n(for hardfault) 0x2000000C. The reserved area of the vector table at 0x10001010\nis used for the clock config that should be configured by the rom startup code.\n\nThat means this crate has to duplicate some functionality from `cortex-m-rt`,\nlike the linker file stuff and also does interrupt handlers in assembly (for\nguranteed size). These new interrupt handlers just emulate the style of normal\ncortex-m interrupts, like Infineon does it in their\n[XMC-for-Arduino](https://github.com/Infineon/XMC-for-Arduino/) project, so end\nusers shouldn't notice anything other than the increased interrupt latency.\n\n## TODO\n- More Peripherals\n- RT is always on by default. Do we want to keep it that way?\n  (It's needed so the exceptions.s has all symbols defined)\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-sawatzke%2Fxmc1100-hal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-sawatzke%2Fxmc1100-hal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-sawatzke%2Fxmc1100-hal/lists"}