Wednesday, June 28, 2017 .CFG file ERROR 33 During script Frederik P. Jun 28, 2017 at 03:51 PM (15:51 hours) Staff: Takao Y. 13 comments I've built a custom app which creates an image without using the Cyclone Universal Image Creation Utility. I have tested and I can make an Image so long as it only contains CM C:\file SS C:\other_file but adding anything else such as EM ;Erase Module causes ERROR 33 during Script!"Command is inactive for this .ARP file."I can't find any documentation anywhere for dealing with this issue. What can the issue be? Comment #1 Frederik P. - June 28, 2017 - 03:51 PM (15:51 hours) Comments Resolved issue by changing .exe file csaparmz.exe.exe to csapacmpz.exein command line call[csaparmz Execution Path] ! [File Path CFG] imagefile [File Path Sap] imagecontent [Image Description] Comment #1.1 Frederik P. - June 29, 2017 - 12:27 PM (12:27 hours) Greetings,Why are you creating your own app? If you want to automate building of SAP images, you can use the CSAP utility. I have sent you documentation on this.Takao Yamada Comment #2 Takao Y. (PEMicro Staff) - June 28, 2017 - 04:00 PM (16:00 hours) The app is not particularly important to the question. What I'd like to understand is the ERROR 33. I know I can write my own .CFG file and have seen another post on it on here. But it doesn't go into enough details to handle errors. I am generating a .CFG file programmatically which, when I run it using command line generates error 33 on EM ;Erase Module. Could you please help me better understand ERROR 33 and what might cause it? I can successfully create an image if I only specify CM and SS why does it break when I add EM? Comment #2.1 Frederik P. - June 28, 2017 - 04:33 PM (16:33 hours) The algorithm used is freescale_k64fn1m0m12_1x32x256k_pflash.arpand it's to create an Image around an .elf file Comment #2.1.1 Frederik P. - June 28, 2017 - 04:40 PM (16:40 hours) Greetings,The error 33 means "Command is inactive for this .ARP file." as you already mentioned. This means the command it tried to run does not exist within the ARP file. Somehow the CFG file is not written correctly. When you generate the CFG file, what is the contents inside when you include the EM command. Please print it here and I can tell you what is wrong.If you go to image creation utility and you create an image, go to File Menu -> Save configurations. Here it will save your settings into a CFG file. Use this as your basis as to why your CFG file is not working.Takao Yamada Comment #3 Takao Y. (PEMicro Staff) - June 28, 2017 - 04:45 PM (16:45 hours) My CFG file looks like thisCM C:\path\to\file\freescale_k64fn1m0m12_1x32x256k_pflash.arpSS C:\path\to\elf\file\file.elfEM BM PM VM command line:[csaparmz Execution Path] ! [File Path CFG] imagefile [File Path Sap] imagecontent [Image Description] Comment #3.1 Frederik P. - June 28, 2017 - 04:56 PM (16:56 hours) Greetings,And when you compare your CFG file with what is generated by the image creation utility, does it match?One key thing to check is for line breaks and next-line characters, which visually you cannot see the difference but in software can cause problems.Takao Yamada Comment #4 Takao Y. (PEMicro Staff) - June 28, 2017 - 05:16 PM (17:16 hours) This is the generated one; Automatically generated configuration file; Silicon Manufacturer is NXP; Silicon Architecture is ARM devices;; LAST USED CONFIGURATION FILE = C:\path\to\file\K64FN1MOM12.cfg; LAST USED ALGORITHM FILE = C:\path\to\file\freescale_k64fn1m0m12_1x32x256k_pflash.arp; LAST USED S RECORD FILE = C:\path\to\elf\file\file.elf; LAST USED IMAGE FILE = C:\path\to\file\file.SAP; LAST USED BARCODE FILE = ; LAST USED PORT = USB1; IGNORE S-RECORD RANGE CHECK.;; RESET_DELAY 0;; PCI_DELAY 3;:DEVICE NXP_K6x_K64FN1M1M12:USESWD 0:SAPGUIVERSION 362E3232:POWEROFFONEXIT 1:NEWIMAGE:DESCRIBEIMAGE eBdridge7800E_V2 test image 6/9/2017 1:26:45 PMCM C:\path\to\file\freescale_k64fn1m0m12_1x32x256k_pflash.arpSS C:\path\to\elf\file\file.elfEM ;Erase ModuleBM ;Blank Check ModulePM ;Program ModuleVM ;Verify Module Comment #4.1 Frederik P. - June 28, 2017 - 05:22 PM (17:22 hours) Greetings,The following lines are very important and should be included in your CFG file::DEVICE NXP_K6x_K64FN1M1M12:USESWD 0Takao Yamada Comment #5 Takao Y. (PEMicro Staff) - June 28, 2017 - 05:26 PM (17:26 hours) Adding them doesn't fix the problem. My program writes every line one by one, not using next-line characters. I don't see any other major differences between the generated file and my own Comment #5.1 Frederik P. - June 28, 2017 - 05:32 PM (17:32 hours) Greetings,Did you get the documents I sent you? Did you try using CSAP to create a SAP image? I want you to try using it with the CFG file generated by the image creation and confirm at least you can do this. Then try using the CFG file you created from scratch. Takao Yamada Comment #6 Takao Y. (PEMicro Staff) - June 29, 2017 - 01:17 PM (13:17 hours) I have resolved my problem and commented how in comment #1.1 Comment #6.1 Frederik P. - June 29, 2017 - 01:23 PM (13:23 hours) Add comment    Want to comment? Please login or create a new PEMicro account.