Page 1 of 1
Creating fresh Custom Code
Posted: Mon Jun 28, 2010 9:23 am
by Kumaran
Hi
I want to create fresh custom component for some devices. what are the parameters that I need to consider changing/ defining? In one of your example document "Custom Components For Flowcode", only macro name & count, Macro return, macro parameter & macro parameter types are instructed to change, where as I find there are some more parameters in default custom code c file & in the beta components.
[Port]
DesiredPort=0
PortMandatory=0
SamePortAsID=0
[Pins]
Count=0
what are these above definition? such that, I have seen many parameters, which I dont I fully understand.
Can you please give your suggestions?
Thanks
M.S.S
Re: Creating fresh Custom Code
Posted: Tue Jun 29, 2010 12:23 pm
by Benj
Hello,
These extra parameters are used by the simulation interaction only and they can be removed from the file when creating new custom components.
Re: Creating fresh Custom Code
Posted: Fri Jul 02, 2010 11:12 am
by Kumaran
As per custom code for flowcode document I have created custom component. I am getting few errors in the complied C and I found error customise component macro. could you please look in to the attached customc file screenshots and suggest me how to resolve them?
problem summary
---------------------
1. I built simple program to check the code, I inserted one function and compiled to c. output of Compiled C code has some error information in it in the custom functions sections like below
void FCD_Custom0_ds1307_init()
{
//Error Reading Code For default::Macro_ds1307_init
}function
2. When I checked the functions in the user component custom code, I have seen that two functions DS1307Write and DS1307Read arguments are incorrect. Please attached screenshot.
Re: Creating fresh Custom Code
Posted: Sat Jul 03, 2010 12:04 am
by Benj
Hello,
Right I have found the problem I think. It was due to the GetDefines section of code. Flowcode v4 changed the way this process was handled so it fell in line with the interrupt and startup sections. I also rearranged the parameters list at the top of the file to correspond with the order of the functions. Not sure if this would make a difference.
Re: Creating fresh Custom Code
Posted: Mon Jul 05, 2010 12:28 pm
by Kumaran
Hi
I have downloded your file. Now the functions are getting read when compiling to c. however, still I am getting errors when compiling the to hex.
The error message
C:\Program Files\HI-TECH Software\PICC\9.70\bin\picc.exe --CHIP=16F877A -N48 DS1307_Custom_Code_example.c
DS1307_Custom_Code_example.c:
94: void FCD_Custom0_GetDefines()
^ (314) ";" expected
(1273) Omniscient Code Generation not available in Lite mode (warning)
HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode) V9.70
Copyright (C) 2009 Microchip Technology Inc.
(908) exit status = 1
Return code = 1
Beauty is that, first time when I am compiling it, I did not get any error messages. After adding some codes I got this error message. So I deleted those codes and kept only one function and tried to compile. this time it got failed to compile.
What could be the reason?
Re: Creating fresh Custom Code
Posted: Mon Jul 05, 2010 3:42 pm
by Benj
Hello,
Right I have had a bit of a look with the custom component file and found a couple of minor problems.
I cannot test that the file is compiling however because I am currently using a 64-bit Windows 7 machine and it keeps giving me the return code 1 error message. If it keeps on like this then its going in a skip or at least as far as I can throw it. I don't care if it is brand new. For anyone out there considering windows 7, don't do it. XP is by far the best Windows OS out there. And likely to stay that way for years to come. I do use 64-bit win 7 at home and that works fine but this machine is just not playing.
Right rant over with here is the custom file. Let me know if it compiles on a non retarded version of Windows.