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

Porting to Teensy 3.2 #2

Open
techhazard opened this issue Dec 27, 2017 · 4 comments
Open

Porting to Teensy 3.2 #2

techhazard opened this issue Dec 27, 2017 · 4 comments

Comments

@techhazard
Copy link

Could you maybe tell me how easy it would be to port tock to the teensy 3.2 that I'm planning to use for my keyboard build.

I found two documents/datasheets for the 3.2 which you can find at the bottom of this page.

I thought that it might just be changing the ROM offsets and such, but I'm only starting with bare metal programming, so I thought I should ask someone with more experience :-)

@techhazard
Copy link
Author

I've started working on porting it to the 3.2 (the teensy-3-2 branch). 😃

If you can find the time, could you please give me a few pointers to where the differences are?
For example: I think I've entered the memory layout correctly (in boards/teensy-32/chip_layout.ld), but I'm not terribly sure 😕

I did find some information about memory layout in section 3.5.1.2 of the K20 reference manual
( mine is the MK20DX256VLH7 ).
I used that to change the values in chip_layout.ld.

Please tell me if I am on the right track regarding memory layout and such 🙂

@shaneleonard
Copy link
Collaborator

Hi @techhazard, this looks like an exciting project. Apologies for such a delayed response, I am currently transitioning to a new job and this repository is going to be transferred to Helena Project (helena-project). I haven't looked into detail about the specific differences between the Teensy 3.2 and 3.6 chips, although you are correct that the memory is laid out differently. I would assume that many of the basic peripherals (SPI, timers, etc.) are similar or identical to those on the 3.6. All of the Cortex-M features are the same for both chips.

One thing to be aware of is that this repository is in an awkward state at the moment, because the maintainers of Tock are currently integrating some of my (very experimental) design features into the mainline Tock repository. When this happens, it will make significant chunks of this repo obsolete (eg. the 'common' directory). There is potentially going to be some significant restructuring here, which will affect the way you proceed with your port to the 3.2.

My recommendation would be to discuss with @alevy and @daniel-scs about the road map for this repository and the 3.2 port, as they are going to be the maintainers henceforth and I'm sure they would love to include you in the conversation.

@alevy
Copy link
Member

alevy commented Jan 23, 2018

@techhazard Note that we've now transfered this repo to the tock org (as you might notice from your browser's address bar). This doesn't neccessarily address the state of the repo as a whole, but it's a good start.

@bradjc has taken over the PR in the main repo that merges the experimental features @shaneleonard mentioned. But I don't necessarily think we need to block on that. I can take a closer look at this pull request later and soon I think we'll figure out a more stable stewardship story for this repo.

@techhazard
Copy link
Author

techhazard commented Jan 25, 2018

@shaneleonard:

Hi @techhazard, this looks like an exciting project.

It is, though I'm taking my time 😄.

[...] the memory is laid out differently. I would assume that many of the basic peripherals [...] are similar or identical [...]

My initial research led me to the same conclusions. The memory layout is different, but most features have a chapter in both books. I have the feeling that the memory-layout should be about the only thing that's really different. But I encountered some "magic numbers", and without proper knowledge of both devices couldn't tell which ones were only valid for the 3.6 and which ones for both. I can say that your comments about the chapters of the reference manual have helped immensely, though it would be great if you (or someone else) could help me understand those things better (this is my first "bare metal" programming endeavor).

this repository is going to be transferred to Helena Project (helena-project)

That's great to hear!

One thing to be aware of is that this repository is in an awkward state at the moment, [..] There is potentially going to be some significant restructuring here, which will affect the way you proceed with your port to the 3.2.

Thanks for this, I'll keep this in mind. Also, Xargo likely going to be merged with Cargo, which is another interesting development. So there might be breakage on all sides in the coming year. I hope that won't stop me from trying 😜

My recommendation would be to discuss with @alevy and @daniel-scs about the road map for this repository and the 3.2 port, as they are going to be the maintainers henceforth and I'm sure they would love to include you in the conversation.

Great Idea 🙂

Apologies for such a delayed response, I am currently transitioning to a new job.

no problem, I never assumed you would reply quickly. (though I had hoped so 😜) And congratulations on the new job! 🎉

@alevy

Note that we've now transfered this repo to the tock org

I noticed, awesome!

[...] But I don't necessarily think we need to block on that. I can take a closer look at this pull request later and soon I think we'll figure out a more stable stewardship story for this repo.

That would be great! I started here, as previously mentioned, but comparing my changes to the 3.6 version is hard on github: all files show as new, because I copied the directory as a starting point. Comparing with 0b955ef0241fba043713599b110acddd319a8dca will work. The changes I made in that commit are in the commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants