[okl4-developer] elfweaver with several IO regions per server

Lukas HANEL lukas.hanel at st.com
Thu Jun 12 18:33:59 EST 2008


Hi,

I figured out how to avoid the problem. But now I do not know, how to do 
the things I want. For the LCD to work, I have to make use of several 
over devices, mainly GPIO and I2C. Of couse, I would like to do it the 
nice way, e.g. use a GPIO server and a I2C server. But, as their are 
currently no examples that make use of such servers, I decided to move 
all this functionality in the LCD driver. Hence I need several memory 
mapped IO regions accessible to my driver.

So, in platform/.../machines.py I specified:
     lcd_memory    = [(0x10120000, 0x10121000)],  # CLCDCcnf registers
                      (0x101E6000, 0x101E7000), # GPIO2 base--> backlight
                     (0x101F8000, 0x101F9000)]  # I2C0 --> backlight

When I reduce this list, I can complete elfweaving. I assume, that the 
python syntax is correct, but that some specification or implementation 
does not foresees several IO regions per driver server. Is this correct?

Would it be easy to implement several IO regions per server in elfweaver?

Or is it, after your experience, easier to correctly implement all these 
  driver servers?

For the last case, I would appreciate some guidance, read: example 
implementations. I would like a (v)gpio server, and a version 2 vbus 
driver, preferably for I2C.

sincerely yours,
Lukas Hänel

Geoffrey Lee wrote:
> On Wed, Jun 11, 2008 at 05:33:39PM +0200, Lukas HANEL wrote:
>> Hi,
>>
>> I am trying to port an LCD driver to OKL4 on my platform. I was 
>> modifying the drivers example and putting in source files in my drivers 
>> folder. After some code cleaning I could compile and finally link the 
>> vlcd server. Using okl4_2.1
> 
> Hi Lukas
> 
> 
> Just a wild guess but maybe the name that you gave the LCD driver
> (in Sconstruct or similar) clashes with an existing entity
> because you re-used the build files without changing the name?
> 
> 	-gl
> 
>> But, in the final elfweaving, a mysterious error occurs:
>>
>> [ELF ] build/images/image.elf
>> Error: Object name "master" already in use.
>>
>> I was then adding some debug output in elfweaver and got the following 
>> output. Any idea?
>>
>> thanks,
>> Lukas Hänel
>>
>>   tools/pyelf/elfweaver --traceback merge -obuild/images/image.elf 
>> build/images/weaver.xml
>> <weaver.namespace.ObjectNameSpace instance at 0x824fdac>
>> {'master': <weaver.bootinfo.Cap instance at 0xb7990b6c>}
>> <weaver.bootinfo.Cap instance at 0xb7990a8c>
>> An error occurred: global name 'print_exc' is not defined
>> Now printing a traceback.
>>
>> Traceback (most recent call last):
>>    File "tools/pyelf/elfweaver", line 74, in ?
>>      main(sys.argv)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/main.py", line 94, in main
>>      commands[args[1]](args[2:])
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/merge.py", line 187, in 
>> merge_cmd
>>      merge(spec_file, options)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/merge.py", line 119, in 
>> merge
>>      namespace, image, machine, pools, bootinfo)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/merge.py", line 97, in 
>> collect_image_objects
>>      collect_program_pd_elements(parsed, ignore_name, namespace, image, 
>> machine, bootinfo, pools)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/prog_pd_xml.py", line 
>> 583, in collect_program_pd_elements
>>      collect_program_element(el, ignore_name, namespace, image, machine, 
>> bootinfo, pools)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/prog_pd_xml.py", line 
>> 336, in collect_program_element
>>      prog_namespace, machine, pools, image, bootinfo)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/prog_pd_xml.py", line 
>> 234, in collect_environment_element
>>      cap_list = cap.get_object().create_implicit_objects(namespace, 
>> machine, pools, image, bootinfo)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/device.py", line 226, 
>> in create_implicit_objects
>>      namespace.add(master.get_name(), master)
>>    File "/home/lukas/okl4_2.1/tools/pyelf/weaver/namespace.py", line 
>> 119, in add
>>      print_exc(file=sys.stdout)
>> NameError: global name 'print_exc' is not defined
>>
>> _______________________________________________
>> Developer mailing list
>> Developer at okl4.org
>> https://lists.okl4.org/mailman/listinfo/developer
>>
> 




More information about the Developer mailing list