I’m a bit surprised that official NXP development tools aren’t supported on RasPi OS. Are those NXP tools for Windows 10 only? Nothing for any flavor of Linux?
That's how it appears to me, but westfw has a good point that I still have to check. I might be able to use parts out of the Arduino framework, which does run on Linux, and the Pi, to make my own toolchain.
Just download the SDK for linux with all toolchain, this will gives you basic SDK with cmake support.
Where?
Is there a step-by-step tutorial to using the RT1062 as a standalone chip?
I don't think so. That sort of thing didn't really last past the 80s. :-(
That's part of why Arduino was so revolutionary.
Huh. I was getting started with AVR in the late '00s / early '10s. (PIC came before that, with a 3rd-party toolchain that someone gave me for free) Google gave me a bunch then, to build a project from scratch for AVR. I just picked one, and it worked.
I had just gotten good at that when the first Arduino came out. The bare chip on a custom PCB was so easy for me that I never saw the point. And I still don't, except for making it "brick-proof". I can understand a basic, know-nothing beginner programming with busy-loop delays, but once you see that working, I think (quite strongly) that the next step should be to convert that into a clearly non-blocking state machine that polls flags instead. Everything else is then based on that.
Not making that transition early, is a major failure as I see it, especially when applications like mine come along that need to control the timing absolutely precisely, and they just can't. Not obviously anyway. The Arduino framework tries to do absolutely everything while keeping the busy-loop delays, and that leads to some concerns about latency and throughput.
But I did just think of something:
The Arduino framework does handle this chip well already (of course it does, it's aimed at beginners!), and there's a remote possibility of open-sourcing a project or two in addition to selling the custom PCB that it runs on. So if customers are going to modify it, then the Arduino framework might be the best thing after all, and I just need to see if it'll work as-is. Possibly yes.
I'd still write my own Audio DSP code, and not use the library that already works but is limited to a specific chip that can't do what I need. But if I can satisfy the timing with cycles to spare, then that's really all that matters.
There are only 2 lines of code in the Arduino's main loop - the loop() function and an event handler called yield() - and I was concerned about the event handler being bloated and not being able to pare it down to where the rest of the code could keep up. (96kHz audio or faster, with no buffer) Maybe it's okay? I could just comment the yield() call out, but what problems does *that* cause?! (besides needing to either ship my entire custom framework or tell customers how to modify theirs)
Trying to avoid customer headaches, and gotchas for the library functions that I do want to use, I wonder how to minimize the event handler's effect while still having all of the functionality that I need? I'm perfectly okay in principle to have my own version of it, probably calling the same API myself, so that I KNOW what the timing is going to be...but that doesn't really work well from a customer's standpoint.
In all of this, I've been trying to avoid interrupts as much as possible, not because I'm scared of them, but as a possible holdover from the 8-bit world, where I really want to reserve them for things that *really do* need IMMEDIATE attention. In the 8-bit world, the interrupt controller disables itself completely until the ISR returns, so that the first interrupt that fires, regardless of priority, runs all the way to completion before another one has a chance. Thus, using interrupts for everything kills the ability to time them precisely, especially when you have an ISR that takes forever to finish!
(big motivation there, to have everything non-blocking, with polled flags for things that would otherwise be low-priority interrupts)
But maybe I do want the DSP code to be entirely interrupt-driven. If it were the highest priority (or the only) interrupt in the system, then that would guarantee the timing, regardless of what the rest of the code is doing or how bloated it might be. Even if I end up spending 90% of the CPU time in that one ISR, that's probably okay. With a 600MHz clock, that leaves me with effectively 60MHz for everything else, fairly evenly spaced, which is *still* an improvement on the 8-32MHz clocks that I'm used to from the 8-bit world!
I also like to have a "CPU load" signal somewhere that I can put an oscilloscope on. In this case, it might be the Teensy's on-board LED, which I would keep for my custom board along with the other Teensy-related stuff. Turn it off at the start of the DSP ISR and on at the end, so if you can still see it, the audio is okay. If it goes out completely, you're trying to do too much. And its frequency can be checked on a 'scope, as the actual sample rate.
So I guess I just need to get the classic "Hello World" to a terminal via USB (in lieu of a "real" debugger), using the stock Arduino framework, build from there while keeping the stock framework, and see when or even *if* it breaks.