Hi guys,

It seems I need some help with generating samples from board and test 
files.....

(while composing this message I more or less found out, but maybe my 
comment could be used for a wiki).


Rob Hamerling wrote:
> One reason is that I changed the samples and not the board 
> files is that I didn't manage to install cheetah on my system (yet).

That appears not to be true! I remember now that I simply don't know how 
to use jallib for the purpose of generating samples from board and test 
files. Jallib's -help function is pretty brief for a dummy like me in 
this case. I couldn't find any info for more help other than Joep's wiki 
'jallib testing' and tried to generate sample files with the following 
command:

   python jallib.py sample -a k:/jallib/sample -o k:/temp

(k: is my normal working drive with the local copy of Jallib).
This generates lots of messages, like:

    Invalid board/test combination: [Errno 2] No such file or directory

    (the usual python traceback omitted)

Which file or directory???? And what means:

    Invalid board/test combination: 'keyboard'

'keyboard' does not sound like a 'combination' to me.

Nevertheless a number of sample files appeared in the  k:/temp 
directory. Some compile OK, others fail, for example with:

   16f648a_display_hd44780_4_line.jal:33: "enable_digital_io" not defined
   ./test/16f648a.jal:566: 'enable_digital_io' previously defined

There reason for this is that enable_digital_io() is called before the 
include of the device file, part of the sample:

   enable_digital_io() -- disable analog I/O (if any)
   ;@jallib section chipdef
   -- chip setup
   include 16f648a

What is the cause of an 'invalid' sample being generated?


Then I tried to create a single sample from a combination of a board and 
a test file with the -b and -t options. And indeed a sample was created, 
although again with a number of python messages:

> k:/python26/lib/site-packages/Cheetah/CacheRegion.py:30: DeprecationWarning: 
> the md5 module is deprecated
> ; use hashlib instead
>   import md5
> Traceback (most recent call last):
>   File "k:/jallib/tools/jallib.py", line 1319, in <module>
>     callme(action_args)
>   File "k:/jallib/tools/jallib.py", line 632, in do_sample
>     generate_one_sample(boardfile,testfile,outfile,deleteiffailed=False)
>   File "k:/jallib/tools/jallib.py", line 541, in generate_one_sample
>     status = do_compile([outfile],exitonerror=False,clean=True)
>   File "k:/jallib/tools/jallib.py", line 209, in do_compile
>     status = 
> subprocess.check_call(cmd,shell=False,stdout=stdout,stderr=stderr)
>   File "k:/python26/lib/subprocess.py", line 457, in check_call
>     retcode = call(*popenargs, **kwargs)
>   File "k:/python26/lib/subprocess.py", line 444, in call
>     return Popen(*popenargs, **kwargs).wait()
>   File "k:/python26/lib/subprocess.py", line 595, in __init__
>     errread, errwrite)
>   File "k:/python26/lib/subprocess.py", line 1092, in _execute_child
>     raise child_exception
> OSError: [Errno 2] No such file or directory

It would be very helpful if it told me *which* file is missing (maybe it 
does but I don't see it!)

Anyway a sample was generated (with the same sequence error with 
enable_digital_io() and chip include).

I would like to generate multiple samples with a single board file and 
multiple test files (one for each test file). If possible, how?

How does Jallib.py know the name of 'my' compiler and where to find it? 
By scanning the python code it seems to try via environment settings 
(documented where?), and indeed when I set these:
  set JALLIB_REPOS=k:/c/jalv2/jalv2ecs.exe
  set JALLIB_JALV2=k:/jallib
I get different error messages:

Traceback (most recent call last):
   File "k:/jallib/tools/jallib.py", line 1319, in <module>
     callme(action_args)
   File "k:/jallib/tools/jallib.py", line 632, in do_sample
     generate_one_sample(boardfile,testfile,outfile,deleteiffailed=False)
   File "k:/jallib/tools/jallib.py", line 541, in generate_one_sample
     status = do_compile([outfile],exitonerror=False,clean=True)
   File "k:/jallib/tools/jallib.py", line 200, in do_compile
     dirs = _explore_dir(d)
   File "k:/jallib/tools/jallib.py", line 116, in _explore_dir
     for fd in os.listdir(onedir):
OSError: [Errno 2] No such file or directory: 'k'

It looks like jallib.py cannot handle the 'k:/' in a path properly. When 
I leave it out (and k: is the working drive) the compiler is invoked and 
the apparently the includes are found as well.
I get the same compilation errors as mentioned above with 
enable_digital_io() and other, but at least something works....


Thanks in advance for our patience ;-)

Regards,

-- 
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to