I am using MCUXPresso SPT tool (which flashes the binary files) and the binary is created and flashed successfully as well , but I cant find my print statement in the serial terminal , the MXP1064 is a svd2rust crate for the particular board
what terminal are you using? your wording indicates you are looking at some "serial port", but the semihosting terminal is part of a debug session, not an actual "terminal" on the host system. so you need to run the code with a debugger attached.
I have not used NXP products, and I don't know if the SPT tool has a semihosting terminal or not, but I often use semihosting with gdb (openocd or qemu), but I prefer RTT if available.
I have tried Putty and gdb , the baud rate I used is 115200. Openocd doesn't have the support for my board (MIMXRT1064) yet so I am nott really sur eif using it is wise.A sfor the debugger I am using the inbuilt one in the board (SWD)
as I said, semihosting only works under a debugging session. if you want to use the serial port, you must do it manually: at the minimum, you should configure the PLL, initialize the UART peripheral, set the the clock divisor according to the baud rate, and configure the IO pin muxer as UART, etc.
that's unfortunate, but semihosting cannot work without a debugger.
as far as I know, probe-rs only implements very little semihosting syscalls for panic handling and unit testing, specifically, it didn't implement the file IO syscalls (probably in favor of RTT).
semihosting can be useful for quick prototyping and debugging, if you are using proprietary "IDE"-style development tools, such as Keil MDK, IAR Embedded Workbench, or Segger Embedded Studio, etc. for open source tools, I think openocd + gdb is the only option (many vscode plugins I know of are based on the gdb remote protocol).
the rust embedded ecosystem generally prefer rtt and have very good support for it.
Can you blink a LED?
Can you configure a second serial port and send some text over it? You'd only have to implement put_ch for all the printing to work. On that serial port, I'd connect a FTDI serial to USB. These work reliably.
Do you have a scope to verify that at least a serial signal is coming out?
owon and hantek do have entry level handheld scopes in the 100 ... 150 US$ range that are actually usable. Stay away from fnirsy!
Edit: put_ch is in C. Maybe the efford isn't big to implement and call it from Rust
I tried LED blinking as well but i might have made some address mistake, is there any way you can link the put_ch code for me , i will hugely appreciate it.BTW i have tried the c example code and that is giving the output on my serial port its just when i use the rust binary it gives the problem.
Sorry, no, can't provide you with any code. I have zero experience with Rust on µC.
µC-development can be very frustrating. Start as simple as possible and verify each step. Wiggle on all ports, maybe in a loop. So you can see that your code is actually running.
Try getting a serial port running, step by step. I assume that Rust's print is built similar like C. And there should be a single function that tries to send a char somewhere.
With a working serial, you are king on a µC, without it, it is just a brick in front of you.
For my µC development, I never used the ISP, just my own port. And again, only C. Not saying that Rust has no place there!