The link in #2 ties into the way stdio uses _write - another option is, FWIW:
int printf (const char *fmt ...) {
va_list ap;
va_start(ap, fmt);
auto r = vdprintf((int) &Serial,...
Type: Posts; User: jcw
The link in #2 ties into the way stdio uses _write - another option is, FWIW:
int printf (const char *fmt ...) {
va_list ap;
va_start(ap, fmt);
auto r = vdprintf((int) &Serial,...
Yes, good catch. I tried w/ bytes() as well, same result alas. It's unfortunate (but understandable) that the HalfKay sources are not available, now it's down to guesswork on what it's expecting. The...
Yep, that's the first thing I tried:
AttributeError: module 'hid' has no attribute 'Device'
I'm on MacOS. I don't know how to get at version info, this is all I have:
>>> hid.__file__...
I'm trying to limit dependencies. The Teensy setup in PlatformIO already includes "teensy_{reboot,restart,serialmon}". There's also "teensy_loader_cli" which is fine for regular uploads, but won't...
Oh, wow, thanks for that. I've looked at the C# link, but then forgot to look a bit better at TyTools.
I'm aiming for all cmd-line/scripted, i.e. just editing and (auto-) saving files, everything...
Yes, I'm on 1.54 - great, so state 4 should be rare. Good to know.
And "teensy_loader_cli --mcu=TEENSY41 -b" will also get me from state 3 to 1.
Looks like that should cover all the cases. Perfect....
To follow up ... in what I have so far, the Teensy can be in one of four states:
1. started up, and waiting for hex input
2. running the ram-application code (it'll go back to 1 if the app ends...
Thanks, that explains the NOEXEC. The devil is in the detail, here's the workflow I have so far, which is already workable:
* one shell window open on the flash-based core "bios" app, using...
Ok, the basic mechanism works, but it's rather nasty: I have to reserve a generous area in ITCM as it looks like code cannot (?) execute in DTCM or in RAM2 (a bit surprising, perhaps due to a...
The Cortex-M7 is superscalar, i.e. it can process more than one instruction per clock cycle.
I think that can explain it - see https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M7
See also...
Thanks @luni, that should help a lot to streamline the process once I get the uploads going. Appreciated.
Thank you @brtaylor - that's quite a bit of reading but it looks like it will get me up to date on all the options and solutions so far. Perfect. I also suspect that the HalfKay loader is flash-only...
To follow up, I'm not able to find the source code for "teensy_reset" and "teensy_serial" - are these online somewhere?
I'd like to reproduce a workflow on the Teensy 4 which I've been using on STM32's: place a "BIOS-like" application in flash, with a variety of libraries and drivers included, which checks for the...
I've pasted the code at https://gist.github.com/jcw/73b2c29fe0172ae8938fb577035d248d
That way it can be edited/fixed/tweaked without cluttering up this forum with buggy code.
Yeah, my bad - I left out some important definitions. Change the definition to:
extern char _itcm_block_count [];.
This is nasty linker stuff. The address is the value, it's not a variable,...
Here's some code to get to grips with memory layout and use (for the Teensy 4.1):
void memInfo () {
constexpr auto RAM_BASE = 0x2020'0000;
constexpr auto RAM_SIZE = 512 << 10;
...
I don't know about audio, but you can find out where things live by comparing with the linker load map (tl062_t41.ld):
ITCM (rwx): ORIGIN = 0x00000000, LENGTH = 512K
DTCM (rwx): ORIGIN =...
At the risk of drawing out a long discussion further ...
Nope, that's not exactly what's going on. The first inner while runs w times, and then always 65535 (i.e. "(uint16_t) 0 - 1").
If w were...
Careful ... on first iteration the w-loop runs N times, but on the next iterations it won't, because w is now zero.
Careful ... your second loop does nothing, because buffer_ptr hasn't been reset.
#include <Arduino.h>
#define BUFFER_SIZE 1024
uint32_t buffer [BUFFER_SIZE];
void setup () {
Indeed, thanks!
Found a related thread at https://forum.pjrc.com/threads/60846-T4-1-Ethernet-board?p=246596&viewfull=1#post246596
Thanks, appreciated. I understand and fully respect the need to trade off "stable" vs "the latest".
I have quite some code which takes advantage of C++17 language features. But hey, just askin'
...
Is C++17 on the roadmap? (I noticed that Teensy 4 is still using 5.4.1)
True, but that (and DC unbalance) could perhaps be solved with 0.1 µF caps in series.
There have been experiments with this approach, e.g. http://www.youritronics.com/magnetic-less-ethernet/.
It...
Would it be possible to connect a Teensy 4 to an Ethernet switch without the intermediate RJ45 jack + magnetics? I'm considering connecting a couple of them (each to its own switch port of course),...
Leave it off. Arduino pin 8 = PB0, and the default of the EtherCard library is 8.
ENC28J60's CS should probably be connected to Teensy's PB0, since Arduino's digital 8 = ATmega's PB0.
The other SPI pins should indeed be connected to PB1, PB2, and PB3 - as mentioned before.