Geert Stappers:
> On Sat, Aug 03, 2019 at 12:38:59PM +0200, k...@aspodata.se wrote:
> > When not all bsdl files are present, some parts get the wrong part name.
...
> > ===================
> > 
> >  When the CortexM3 file is missing:
> > 
> > Device Id: 00111011101000000000010001110111 (0x3BA00477)
> >   Unknown manufacturer! (01000111011) 
> > (/usr/local/share/urjtag/MANUFACTURERS)
> > Device Id: 00000110010000100000000001000001 (0x06420041)
> >   Filename:     ./STM32F1_Low_Med_density_value_LQFP48.bsd
> > jtag> print chain
> >  No. Manufacturer              Part                 Stepping Instruction    
> >       Register                        
> > -------------------------------------------------------------------------------------------------------------------
> >    0                           STM32F1_Low_Med_dens          (none)         
> >       (none)                          
> > *  1                           STM32F1_Low_Med_dens          BYPASS         
> >       BYPASS                          
...
> The subject line  mentions "bug", what is the bug?

The bug is that part #0 get the part name STM32F1_Low_Med_dens, when 
the program in fact didn't find a part name for this part. So the line 
for part #0 above, should have an empty "Part" cell.

The bug is due to that urj_vhdl_set_entity() (src/bsdl/vhdl_bison.y 
line 916..926) saves the entity name in jtag_ctrl.part->part (that is 
the string that shows up in the "Part" column), even though we don't 
know at that stage in the parser if "this" file matches the idcode
or not.

The entity is the first non-comment thing that shows up in a bsdl file,
e.g.:

$ egrep -v '^\s?--' STM32F1_Low_Med_density_value_LQFP48.bsd | head 

 entity STM32F1_Low_Med_density_value_LQFP48 is
 
   
   generic (PHYSICAL_PIN_MAP: string:= "LQFP48_PACKAGE");
   
   
   port ( 
          BOOT0         : in    bit;
          JTDI          : in    bit;

Regards,
/Karl Hammar



_______________________________________________
UrJTAG-development mailing list
UrJTAG-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to