Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.
I have this batch file
SET jlinklocation = D:\Program Files\SEGGER\JLinkARM_V482\
cd /d %jlinklocation %
(
echo Device AT91SAM7S64
echo loadbin C:\binfile.bin 0X100000
)|jlink.exe
exit


My problem is taht the AT91SAM7S64 have an space after it. and jlink program want use this ->
"AT91SAM7S64 " attention to space character after "64". in .bat file I dont see the space character. How can I solve this ?
Posted
Comments
CHill60 22-Mar-14 9:49am    
If you open this in Notepad, go to the line echo Device AT91SAM7S64 and hit the end key do you not have a space? Put one in (or delete it if you find it and don't want it). Don't use an editor that automatically removes whitespace from the end of a line

1 solution

First of all, you cannot use "%jlinklocation %", it should be "%jlinklocation%", otherwise reference to the set symbol won' work.

As to the blank space in "AT91SAM7S64 " and related problem is not manifested in your code sample anyhow.
echo Device AT91SAM7S64

simply outputs string in the console, so the blank space won't make any difference. If you explain the role of the blank space at the end or desired effect, I'll try to answer.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900