Search results

  1. flok

    Teensyduino 1.60 Beta #3

    Hi, The gdb of this version unfortunately doesn't run on Ubuntu 24.10: folkert@snsv ~/.arduino15 $ ./packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-gdb ./packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-gdb: error while loading shared libraries...
  2. flok

    tracing

    Ah that looks useful! Thanks, will definitely give it a try.
  3. flok

    tracing

    I don't think I agree with the embedded platform in general. E.g. the esp32 dumps a stacktrace when something bad happens.
  4. flok

    tracing

    Hi, I was missing a stack-trace thing for when my program crashes. I came up with something that works reasonably well for my use-case (not really a stack-trace but it'll do for now). Every interesting point in the source-code, I add a PUSH_BC(); Then when the Teensy4.1 reboots, I get: Code...
  5. flok

    Please help me, it's urgent.

    I used CrashReport.breadcrumb() and printf etc.
  6. flok

    Please help me, it's urgent.

    There are indeed differences (I checked with a led blinker compile). BUT: both the arduino ide version AND platformio use the -fno-exceptions switch. And thus a 'new something[]();' will fail silently when running out of memory. Then it dawned to me: that 0xC is a just an offset in a...
  7. flok

    Please help me, it's urgent.

    I'm running Linux with platformio. I'm kind of certain that I got the right version of addr2line: /home/folkert/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/arm-none-eabi-addr2line as there's teensy in thee directory-name, and it is the only teensy-addr2line on my system :-) I...
  8. flok

    Please help me, it's urgent.

    I think I do so. I use platformio which automatically installs all the dependencies with the correct version.
  9. flok

    optimizing SD write access

    I did. In csdDmp (line 71 of SdInfo.ino) it says "erasesize is ... blocks" but it did not specify how big a block is (as 512 bytes is not a given these days, some media have 4k sectors). Also it says 64512 blocks. Shouldn't that be a power of 2? Or is there something like error correction codes...
  10. flok

    Please help me, it's urgent.

    Could you please describe the addr2line? Because everytime a program of mine crashes, e.g.: Code was executing from address 0x41F24 addr2line never seems to be able to convert that: $ /home/folkert/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/arm-none-eabi-addr2line -e...
  11. flok

    SD card corruptions

    Haha yes indeed I forgot that seek in the test-code. What I saw though without the seek was not the data of the earlier iteration (what was expected) but garbage. *with* the seek, I get all correct data. Puzzled.
  12. flok

    SD card corruptions

    I've reduced my code 100-fold (6k lines to 56 lines) and this shows it failing: #include <SD.h> FsFile file; void setup() { Serial.begin(115200); if (SD.sdfs.begin(SdioConfig(DMA_SDIO))) Serial.println(F("Init SD-card succeeded")); else Serial.println(F("Init...
  13. flok

    SD card corruptions

    Yeah please ignore that copy/paste error for the write. that arm_dcache_flush should've been for data_write etc as well
  14. flok

    SD card corruptions

    Yeah so that makes: arm_dcache_flush_delete(buffer, block_size); ssize_t rc = file.read(buffer, block_size); to make sure that after the file.read, it will go through the cache and fetch from ram. And write: arm_dcache_flush(buffer...
  15. flok

    optimizing SD write access

    Hi, I would like to optimize SD write access. So ideally I would like to group multiple writes into one that fits in a erase-sector. For that I need to know what offset ina file is for what erase-sector. Is it possible to obtain that information somehow?
  16. flok

    SD card corruptions

    I got back to my project to see if I can do any performance tweaks. In the March version of my project I just did a arm_dcache_flush_delete for both read and writes, but that may be a bit overdoing it? Especially as @jmarsh wrote that (only) flush is for writing and delete for reading. Now I...
  17. flok

    SD card corruptions

    True. Ok it now works. On the Teensy4.1 and when verified on the pc. Thanks for your help.
  18. flok

    SD card corruptions

    Oh indeed. I now do not get an error. It's not clear to me though which one to use when arm_dcache_delete or arm_dcache_flush. For write I do now both before the file.write() call. I verified the contents of the sd card on my pc but the data is not what I expected it to be. Shouldn't the sdfat...
  19. flok

    SD card corruptions

    Hi JMarsh! Something like? arm_dcache_delete(data, n_bytes_to_read); size_t bytes_read = file.read(data, n_bytes_to_read); rc = bytes_read == n_bytes_to_read; if (rc) { arm_dcache_flush(data...
  20. flok

    SD card corruptions

    Hi, I think I'm doing something wrong but I can't figure out what. The situation is that if I write a block of data to the SD-card and then read it back again, then parts of the written data are missing (some parts are then all 0x00) or it is all totally different. Source code: (zip) Sleep...
  21. flok

    iSCSI target

    Yes, it is in the ESP32 microcontrollers folder. I have to rename that folder (will do so now but it may take a bit). I just renamed that folder from ESP32 to microcontrollers. It uses platformio. So pio run -t upload -e Teensy4_1 should produce a runnable device.
  22. flok

    iSCSI target

    In this graph you see that iTEENSY quickly goes to 10MB/s, maxing out the Ethernet connection: Thus in theory the Teensy4.1 should be able to reach higher speeds even (if it would have Gb Ethernet).
  23. flok

    iSCSI target

    Hi, Remote storage is usually a NAS or a SAN. A NAS is where you access data by files. p:\\diary.pdf or so. A SAN is accessed via a protocol like iSCSI, FC and others. A client ("initiator") then requests blocks of data like how it does from a harddisk. A harddisk does not store files, it...
  24. flok

    iSCSI target

    I always wanted to write an iSCSI target since I worked (professionally) with IBM iSCSI boxes (iSCSI is used to communicated with SAN systems. It allows blocks of data to be transferred to client systems.). I finally got around doing so. There are a few implementations for Linux/BSD/etc but I...
  25. flok

    backtrace

    Paul, thank you for the clarification! I got it all working now (mostly; but enough for my proof of concept).
  26. flok

    backtrace

    Hi, How can I get a backtrace? Not neccessarily in a debugger, just via serial. Addresses are enough (I can get line numbers and such via e.g. ~/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/arm-none-eabi-addr2line -e .pio/build/Teensy4_1/firmware.elf 0x20037d38 ). I tried...
  27. flok

    Teensy 4.1: flashing fails every other time

    F.w.i.w.: after, say, 50 flashes it becomes unreliable. Like not always booting up. Only reflashing it helps then, sometimes after 2 or 3 times.
  28. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    I did in my second post (the reply to myself). Looks like something still goes wrong (when doing tcp/udp interleaved), but I'm investigating it.
  29. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    I fixed it: the compile problems with QNEthernet were due to conflicts with a board-package version. Yes, with QNEthernet the networking problems are gone. Nice! Please close the ticket :) (now the SD card does not seem to work?!)
  30. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    That's problematic: .pio/libdeps/Teensy4_1/QNEthernet/src/lwipopts.h:208:36: error: expected identifier before numeric constant 208 | #define TCP_MSS 1460 /* 536 */ | ^~~~
  31. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    Hmmm, in some cases it still doesn't work.
  32. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    Found something: this problem does not happen (with the little example program in my 2nd post) in teensyduino 1.158.0, only in 1.159.0.
  33. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    I shrunk the program a bit and it still shows the problem: #include <NativeEthernet.h> #include <NativeEthernetUdp.h> EthernetServer *server { nullptr }; EthernetUDP *handle { nullptr }; uint8_t mac[6] { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc }; void setup() { Serial.begin(115200)...
  34. flok

    Teensy 4.1: flashing fails every other time

    Hi, Thanks. It did change the behaviour indeed. It looks like it now works altough one time I did not even pressed reset and it already started flashing (or maybe the reset button is very sensitive and I did not notice that I was touching it already).
  35. flok

    Teensy 4.1: can't get combined UDP/TCP server to work (now with example code)

    Hi, I'm trying to port an application of mine to the teensy 4.1. Compiling and linking is no problem but networking is problematic (for me at least :) ). I have two sockets: one listens on a UDP port one listens on a TCP port What I then do is: EthernetServer *server = new...
  36. flok

    Teensy 4.1: flashing fails every other time

    Hi, Received my Teensy 4.1 in the mail today. Looks good! Flashing fails every 1st time though (2nd succeeds, 3d fails, 4th succeeds etc) Configuring upload protocol... AVAILABLE: jlink, teensy-cli, teensy-gui CURRENT: upload_protocol = teensy-cli Rebooting... Uploading...
  37. flok

    Linker error (embedding Lua on a Teensy 4.1)

    I eventually got it to work: there was a stray fopen left in my code somewhere.
  38. flok

    Linker error (embedding Lua on a Teensy 4.1)

    Were you be able to fix this problem? I'm seeing it as well: /home/folkert/.platformio/packages/toolchain-gccarmnoneeabi-teensy/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld...
  39. flok

    c++17 std::optional

    (for google) add: platform_packages = platformio/framework-arduinoteensy@^1.159.0 build_flags = -std=gnu++17 build_unflags = -std=gnu++14 to platformio.ini.
  40. flok

    c++17 std::optional

    Oh wait, it is already available yet as I'm using platformio not available directly to me. I'll see if I can change that.
  41. flok

    c++17 std::optional

    Hi, I'm trying to port an application of my from the ESP32/RP2040 to the Teensy 4.1 platform. It uses std:: optional but that does not seem to be supported? Any plans to do so? Thanks!
  42. flok

    basic MPC3202 reading problem

    Observation: same code + electronics work fine on a teensy 4.0.
  43. flok

    basic MPC3202 reading problem

    Hi, I'm trying something very simple: reading samples from an MCP3202. I can't get it to work. #include <SPI.h> #include <Mcp320x.h> #define SPI_CS 10 // SPI slave select #define ADC_VREF 3300 // 3.3V Vref #define ADC_CLK 1600000 // SPI clock 1.6MHz MCP3202...
  44. flok

    hangs with teensy lc

    Hang on; I saw this earlier with an arduino uno I only realised! (talking serial through usb to a host system) I thought it had to do with an uart filling up but an usb-buffer makes more sense.
  45. flok

    hangs with teensy lc

    Ah that I did not know. That indeed helps a bit. The problem did not disappear yet. I ordered another LC that I'll use solely with software-tests, e.g. not with new hardware. So that I know that I did not damage it.
  46. flok

    hangs with teensy lc

    Hi, I designed some hardware: 2 analogue inputs (-5...5V), 4 digital input (one for which I forgot to add a voltage divider). It also has a din midi plug. https://vps001.vanheusden.com/~folkert/hwteensylc.pdf To test it, I wrote a simple arduino script which shows the readings of the digital...
  47. flok

    Teensy 4.0 fingerprint for eagle cad?

    Maybe this will work: http://vanheusden.com/Teensy4.zip
  48. flok

    CV to teensy and vice versa

    jscircuit says this works...
  49. flok

    CV to teensy and vice versa

    Hi, I'm trying to migrate a schematic I made around an arduino (nano) to teensy lc. This schematic converts a "control voltage" (-5...+5v) to ADC levels (0...5V) and the output of an MCP4725 to that control voltage. In case anyone is interested how I do that: to cv...
  50. flok

    Teensy 4.0 fingerprint for eagle cad?

    But not the pin-out I think?
Back
Top